rake-compile 0.1.4 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ee964b6e33a61a60ab30c374a8f360cfba8cf7c
4
- data.tar.gz: 0d1907af546dcb7d566e748fc6c535ed61b22b64
3
+ metadata.gz: e5ecf04771fcb41486979d9898c250eaa7fb073c
4
+ data.tar.gz: b001cc30c57d6fc01c2f3e7629edcfae744666f0
5
5
  SHA512:
6
- metadata.gz: 850f4a5f43e4a46056385a61a80ef6ec8acccdf2d76014be1e5402bcb2b4fcda1336dde6ae36f1fcbc9965d8771695fb02682861daf5bc92b0dcc2add3cd86c3
7
- data.tar.gz: 6fdeaabec37493c50c0349e2cbc1e7c561d81c3681afe91586aba70ad583bbd9eeb3bdb65d93d6523b426a13e6c39d3e3980ce1f5959ea15a634b394db0e46b1
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
@@ -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.gsub!(" \\\n ", " ")
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
- dependencies.reject! { |x| x.empty? } # remove blanks
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
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-02 00:00:00.000000000 Z
11
+ date: 2014-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake