rake-compile 0.1.4 → 0.2.1
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/rake-compile/application.rb +7 -1
- data/lib/rake-compile/dsl_definition.rb +8 -0
- data/lib/rake-compile/target.rb +4 -4
- 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: e5ecf04771fcb41486979d9898c250eaa7fb073c
|
4
|
+
data.tar.gz: b001cc30c57d6fc01c2f3e7629edcfae744666f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5af0014c4d30f7bf9ec4475777bdfb3854ebf5e95e967c1f07d59d0703d6b1977f0a4c2577caa316a2d1741f2f3838dc3bad6f1328649e1f67cd370f2eec5317
|
7
|
+
data.tar.gz: 27927ca74e709010c4f97e243ce93d4ed6de66ec9fb3b81e740733f9d6ac2ac8831fd875f9fd62e048854d0ea255a595604524a6228c7a72df8b677ec8260a77
|
@@ -5,6 +5,8 @@ module RakeCompile
|
|
5
5
|
attr_accessor :cpp_flags
|
6
6
|
attr_accessor :base_cc_flags
|
7
7
|
attr_accessor :cc_flags
|
8
|
+
attr_accessor :base_ld_flags
|
9
|
+
attr_accessor :ld_flags
|
8
10
|
attr_reader :libraries
|
9
11
|
attr_accessor :pch
|
10
12
|
|
@@ -24,8 +26,12 @@ module RakeCompile
|
|
24
26
|
"#{self.base_cc_flags} #{self.cc_flags}"
|
25
27
|
end
|
26
28
|
|
29
|
+
def full_ld_flags
|
30
|
+
"#{self.base_ld_flags} #{self.ld_flags}"
|
31
|
+
end
|
32
|
+
|
27
33
|
def flags
|
28
|
-
{:cc_flags => self.full_cc_flags, :cpp_flags => self.full_cpp_flags}
|
34
|
+
{:cc_flags => self.full_cc_flags, :cpp_flags => self.full_cpp_flags, :ld_flags => self.full_ld_flags}
|
29
35
|
end
|
30
36
|
end
|
31
37
|
end
|
@@ -26,6 +26,14 @@ module RakeCompile
|
|
26
26
|
RakeCompile::Application.app.cpp_flags = flags
|
27
27
|
end
|
28
28
|
|
29
|
+
def base_ld_flags(flags)
|
30
|
+
RakeCompile::Application.app.base_ld_flags = flags
|
31
|
+
end
|
32
|
+
|
33
|
+
def ld_flags(flags)
|
34
|
+
RakeCompile::Application.app.ld_flags = flags
|
35
|
+
end
|
36
|
+
|
29
37
|
def link_library(library)
|
30
38
|
RakeCompile::Application.app.libraries << library
|
31
39
|
end
|
data/lib/rake-compile/target.rb
CHANGED
@@ -96,6 +96,7 @@ module RakeCompile
|
|
96
96
|
cmd += " -o '#{self.name}'"
|
97
97
|
cmd += " '#{inputs}'"
|
98
98
|
cmd += " '#{libs}'" if libs.length > 0
|
99
|
+
cmd += " #{RakeCompile::Application.app.full_ld_flags}"
|
99
100
|
|
100
101
|
Rake::sh(cmd)
|
101
102
|
end
|
@@ -185,11 +186,10 @@ module RakeCompile
|
|
185
186
|
puts s if verbose() != false
|
186
187
|
output = `#{s}`.chomp()
|
187
188
|
|
188
|
-
output.
|
189
|
-
|
190
|
-
dependencies = output.split(" ")
|
189
|
+
dependencies = output.split()
|
191
190
|
dependencies.delete_at(0) # remove the first element, which is the object file itself
|
192
|
-
|
191
|
+
|
192
|
+
dependencies.reject! { |x| x.empty? || x == '\\' } # remove blanks and line continuations
|
193
193
|
|
194
194
|
dependencies.collect { |x| File.absolute_path(x) }
|
195
195
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-compile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Massicotte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|