lake-cpp 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lake/plugins/cpp.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45475c8446c461f13957f2870aee56b416d5bdba
|
4
|
+
data.tar.gz: 3b68266b31490af5dcde8fac09a1363009bd9d25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 372a2da799a52216b0e77fe2d3cd88f6f5aa1dd0c5854e12b60d57830d63c8678fe7f98a14fb4c721ad27eea5b9080322e6a6274be1831f513eb8cd462f3bdb5
|
7
|
+
data.tar.gz: 96cc1a7709bc7c52deecc3589a863cedbd0a81d62ef6c2599ff36ef7af98e16e568c69ecbbad1c07eba13ec2b035470a80e39b8614c3841f66dad8aea4913026
|
data/lib/lake/plugins/cpp.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class CCompiler
|
2
|
-
attr_accessor :flags,:compiler
|
2
|
+
attr_accessor :flags,:compiler,:shared
|
3
3
|
def initialize(compiler:"gcc",flags:"")
|
4
4
|
@flags,@compiler = flags,compiler
|
5
5
|
end
|
@@ -9,8 +9,12 @@ class CCompiler
|
|
9
9
|
super code
|
10
10
|
end
|
11
11
|
|
12
|
-
def compile(source,output=nil)
|
12
|
+
def compile(source,output=nil,object=false)
|
13
13
|
output ||= File.basename(source,".*") + ".out"
|
14
|
-
system "#{@compiler} #{@flags} -o \"#{output}\" \"#{source}\""
|
14
|
+
system "#{@compiler} #{@flags} #{object ? "-c" : ""} -o \"#{output}\" \"#{source}\""
|
15
|
+
end
|
16
|
+
|
17
|
+
def link(*files,output)
|
18
|
+
system "#{@compiler} #{@flags} -o \"#{output}\" #{files.inject(""){|a,b| a + "\"#{b}\" "}}"
|
15
19
|
end
|
16
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lake-cpp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stepan unn4m3d Melnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lake
|