dev 1.0.89 → 1.0.90
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dev/BoostBuild.rb +52 -0
- metadata +1 -1
data/lib/dev/BoostBuild.rb
CHANGED
@@ -8,5 +8,57 @@ class BoostBuild
|
|
8
8
|
}
|
9
9
|
return toolset
|
10
10
|
end
|
11
|
+
|
12
|
+
def self.getLibraryProperties(filename)
|
13
|
+
words=filename.split('-')
|
14
|
+
flags=words[2];
|
15
|
+
flags = flags + "-" + words[3] if words.length == 5
|
16
|
+
result="<toolset>" + getToolset(words[1])
|
17
|
+
link="static"
|
18
|
+
link="shared" if filename.indexOf("lib") != 0
|
19
|
+
link="shared" if filename.include?(".so")
|
20
|
+
result = result + " <link>" + link + " "
|
21
|
+
result = result + " <variant>release " if !flags.include?("d")
|
22
|
+
result = result + " <variant>debug " if flags.include?("d")
|
23
|
+
result = result + " <threading>multi " if flags.include?("mt")
|
24
|
+
result = result + " <threading>single " if !flags.include?("mt")
|
25
|
+
result = result + " <runtime-link>shared " if !flags.include?("s")
|
26
|
+
result = result + " <runtime-link>static " if flags.include?("s")
|
27
|
+
result = result + " <runtime-debugging>off " if !flags.include?("g")
|
28
|
+
result = result + " <runtime-debugging>on " if flags.include?("g")
|
29
|
+
result = result ";"
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.buildJamfile(directory)
|
33
|
+
jamfilename=directory+"/Jamfile"
|
34
|
+
if(File.exists?(jamfilename))
|
35
|
+
puts "Jamfile already exists."
|
36
|
+
return
|
37
|
+
end
|
38
|
+
if(File.exists?(directory))
|
39
|
+
Dir.chdir(directory) do
|
40
|
+
File.open(jamfilename,'w') { |jamfile|
|
41
|
+
Dir.glob("*boost_*").each {|f|
|
42
|
+
jamfile.puts getJamfileLine(f)
|
43
|
+
}
|
44
|
+
}
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.getJamfileLine(filename)
|
50
|
+
words=filename.split('-')
|
51
|
+
library = words[0]
|
52
|
+
library = library[3,library.length-3] if library.indexOf("lib") == 0
|
53
|
+
return "lib " + library + " : : <file>./" + filename + " " + getLibraryProperties(filename)
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.getToolset(name)
|
57
|
+
toolset = "msvc"
|
58
|
+
toolset = "msvc-9.0" if name=='vc90'
|
59
|
+
toolset = "msvc-10.0" if name=='vc100'
|
60
|
+
toolset = "msvc-11.0" if name=='vc110'
|
61
|
+
return toolset
|
62
|
+
end
|
11
63
|
end
|
12
64
|
end
|