cxxproject 0.6.12 → 0.6.13
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cxxproject/version.rb +1 -1
- metadata +55 -53
- data/lib/cxxproject/eval_context.rb +0 -124
data/lib/cxxproject/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: cxxproject
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.6.
|
5
|
+
version: 0.6.13
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- oliver mueller
|
@@ -10,11 +10,10 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-07-
|
13
|
+
date: 2012-07-16 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: colored
|
17
|
-
prerelease: false
|
18
17
|
requirement: &id001 !ruby/object:Gem::Requirement
|
19
18
|
none: false
|
20
19
|
requirements:
|
@@ -22,10 +21,10 @@ dependencies:
|
|
22
21
|
- !ruby/object:Gem::Version
|
23
22
|
version: "0"
|
24
23
|
type: :runtime
|
24
|
+
prerelease: false
|
25
25
|
version_requirements: *id001
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: frazzle
|
28
|
-
prerelease: false
|
29
28
|
requirement: &id002 !ruby/object:Gem::Requirement
|
30
29
|
none: false
|
31
30
|
requirements:
|
@@ -33,6 +32,7 @@ dependencies:
|
|
33
32
|
- !ruby/object:Gem::Version
|
34
33
|
version: "0"
|
35
34
|
type: :runtime
|
35
|
+
prerelease: false
|
36
36
|
version_requirements: *id002
|
37
37
|
description: " Some more high level building blocks for cpp projects.\n"
|
38
38
|
email: oliver.mueller@gmail.com
|
@@ -43,73 +43,72 @@ extensions: []
|
|
43
43
|
extra_rdoc_files: []
|
44
44
|
|
45
45
|
files:
|
46
|
-
- lib/cxxproject/buildingblocks/binary_library.rb
|
47
|
-
- lib/cxxproject/buildingblocks/building_block.rb
|
48
|
-
- lib/cxxproject/buildingblocks/command_line.rb
|
49
|
-
- lib/cxxproject/buildingblocks/custom_building_block.rb
|
50
|
-
- lib/cxxproject/buildingblocks/executable.rb
|
51
|
-
- lib/cxxproject/buildingblocks/has_dependencies_mixin.rb
|
52
|
-
- lib/cxxproject/buildingblocks/has_includes_mixin.rb
|
53
|
-
- lib/cxxproject/buildingblocks/has_libraries_mixin.rb
|
54
|
-
- lib/cxxproject/buildingblocks/has_sources_mixin.rb
|
55
|
-
- lib/cxxproject/buildingblocks/makefile.rb
|
56
|
-
- lib/cxxproject/buildingblocks/module.rb
|
57
|
-
- lib/cxxproject/buildingblocks/single_source.rb
|
58
|
-
- lib/cxxproject/buildingblocks/source_library.rb
|
59
|
-
- lib/cxxproject/context.rb
|
60
|
-
- lib/cxxproject/cxxproject.rb
|
61
46
|
- lib/cxxproject/errorparser/error_parser.rb
|
62
|
-
- lib/cxxproject/
|
63
|
-
- lib/cxxproject/ext/file.rb
|
64
|
-
- lib/cxxproject/ext/filelist.rb
|
65
|
-
- lib/cxxproject/ext/hash.rb
|
66
|
-
- lib/cxxproject/ext/progressbar.rb
|
67
|
-
- lib/cxxproject/ext/rake.rb
|
68
|
-
- lib/cxxproject/ext/rake_dirty.rb
|
69
|
-
- lib/cxxproject/ext/rake_listener.rb
|
70
|
-
- lib/cxxproject/ext/stdout.rb
|
71
|
-
- lib/cxxproject/ext/string.rb
|
72
|
-
- lib/cxxproject/ide_interface.rb
|
73
|
-
- lib/cxxproject/plugin_context.rb
|
74
|
-
- lib/cxxproject/toolchain/colorizing_formatter.rb
|
75
|
-
- lib/cxxproject/toolchain/provider.rb
|
76
|
-
- lib/cxxproject/toolchain/toolchain.rb
|
47
|
+
- lib/cxxproject/utils/optional.rb
|
77
48
|
- lib/cxxproject/utils/cleanup.rb
|
78
49
|
- lib/cxxproject/utils/exit_helper.rb
|
79
|
-
- lib/cxxproject/utils/
|
80
|
-
- lib/cxxproject/utils/optional.rb
|
81
|
-
- lib/cxxproject/utils/printer.rb
|
50
|
+
- lib/cxxproject/utils/rbcurse_progress.rb
|
82
51
|
- lib/cxxproject/utils/process.rb
|
83
|
-
- lib/cxxproject/utils/
|
84
|
-
- lib/cxxproject/utils/
|
52
|
+
- lib/cxxproject/utils/ubigraph.rb
|
53
|
+
- lib/cxxproject/utils/printer.rb
|
85
54
|
- lib/cxxproject/utils/rbcurse.rb
|
55
|
+
- lib/cxxproject/utils/progress_helper.rb
|
86
56
|
- lib/cxxproject/utils/rbcurse_executable_ext.rb
|
87
|
-
- lib/cxxproject/utils/rbcurse_progress.rb
|
88
|
-
- lib/cxxproject/utils/rbcurse_tasktable.rb
|
89
|
-
- lib/cxxproject/utils/ubigraph.rb
|
90
57
|
- lib/cxxproject/utils/utils.rb
|
58
|
+
- lib/cxxproject/utils/rbcurse_tasktable.rb
|
59
|
+
- lib/cxxproject/utils/progress.rb
|
60
|
+
- lib/cxxproject/utils/graphstream.rb
|
61
|
+
- lib/cxxproject/toolchain/provider.rb
|
62
|
+
- lib/cxxproject/toolchain/colorizing_formatter.rb
|
63
|
+
- lib/cxxproject/toolchain/toolchain.rb
|
91
64
|
- lib/cxxproject/version.rb
|
65
|
+
- lib/cxxproject/ide_interface.rb
|
66
|
+
- lib/cxxproject/ext/rake_listener.rb
|
67
|
+
- lib/cxxproject/ext/filelist.rb
|
68
|
+
- lib/cxxproject/ext/string.rb
|
69
|
+
- lib/cxxproject/ext/rake.rb
|
70
|
+
- lib/cxxproject/ext/progressbar.rb
|
71
|
+
- lib/cxxproject/ext/stdout.rb
|
72
|
+
- lib/cxxproject/ext/hash.rb
|
73
|
+
- lib/cxxproject/ext/rake_dirty.rb
|
74
|
+
- lib/cxxproject/ext/file.rb
|
75
|
+
- lib/cxxproject/context.rb
|
76
|
+
- lib/cxxproject/plugin_context.rb
|
77
|
+
- lib/cxxproject/buildingblocks/building_block.rb
|
78
|
+
- lib/cxxproject/buildingblocks/has_libraries_mixin.rb
|
79
|
+
- lib/cxxproject/buildingblocks/custom_building_block.rb
|
80
|
+
- lib/cxxproject/buildingblocks/makefile.rb
|
81
|
+
- lib/cxxproject/buildingblocks/has_includes_mixin.rb
|
82
|
+
- lib/cxxproject/buildingblocks/has_sources_mixin.rb
|
83
|
+
- lib/cxxproject/buildingblocks/binary_library.rb
|
84
|
+
- lib/cxxproject/buildingblocks/executable.rb
|
85
|
+
- lib/cxxproject/buildingblocks/module.rb
|
86
|
+
- lib/cxxproject/buildingblocks/single_source.rb
|
87
|
+
- lib/cxxproject/buildingblocks/has_dependencies_mixin.rb
|
88
|
+
- lib/cxxproject/buildingblocks/source_library.rb
|
89
|
+
- lib/cxxproject/buildingblocks/command_line.rb
|
90
|
+
- lib/cxxproject/cxxproject.rb
|
92
91
|
- Rakefile.rb
|
93
|
-
- spec/
|
94
|
-
- spec/
|
95
|
-
- spec/file_ext_spec.rb
|
92
|
+
- spec/string_spec.rb
|
93
|
+
- spec/project_path_spec.rb
|
96
94
|
- spec/ide_interface_spec.rb
|
95
|
+
- spec/spec_helper.rb
|
97
96
|
- spec/object_dependency_spec.rb
|
98
|
-
- spec/
|
99
|
-
- spec/project_path_spec.rb
|
97
|
+
- spec/building_block_spec.rb
|
100
98
|
- spec/provider_spec.rb
|
101
|
-
- spec/
|
102
|
-
- spec/
|
103
|
-
- spec/string_spec.rb
|
99
|
+
- spec/plugin_context_spec.rb
|
100
|
+
- spec/file_ext_spec.rb
|
104
101
|
- spec/testdata/basic/exe12/project.rb
|
105
102
|
- spec/testdata/basic/lib1/project.rb
|
106
103
|
- spec/testdata/basic/lib2/project.rb
|
104
|
+
- spec/testdata/onlyOneHeader/Rakefile.rb
|
105
|
+
- spec/testdata/onlyOneHeader/project.rb
|
107
106
|
- spec/testdata/multiple_levels/libs/lib1/project.rb
|
108
107
|
- spec/testdata/multiple_levels/libs/lib2/project.rb
|
109
108
|
- spec/testdata/multiple_levels/mainproject/basic/project.rb
|
110
|
-
- spec/
|
111
|
-
- spec/testdata/onlyOneHeader/Rakefile.rb
|
109
|
+
- spec/cxxproject_2_rake_spec.rb
|
112
110
|
- spec/toolchain_spec.rb
|
111
|
+
- spec/rake_listener_ext_spec.rb
|
113
112
|
homepage: https://github.com/marcmo/cxxproject
|
114
113
|
licenses: []
|
115
114
|
|
@@ -123,6 +122,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
122
|
requirements:
|
124
123
|
- - ">="
|
125
124
|
- !ruby/object:Gem::Version
|
125
|
+
hash: 1141907832559414132
|
126
|
+
segments:
|
127
|
+
- 0
|
126
128
|
version: "0"
|
127
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
130
|
none: false
|
@@ -133,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
135
|
requirements: []
|
134
136
|
|
135
137
|
rubyforge_project:
|
136
|
-
rubygems_version: 1.8.
|
138
|
+
rubygems_version: 1.8.24
|
137
139
|
signing_key:
|
138
140
|
specification_version: 3
|
139
141
|
summary: Cpp Support for Rake.
|
@@ -1,124 +0,0 @@
|
|
1
|
-
require 'cxxproject/context'
|
2
|
-
|
3
|
-
module Cxxproject
|
4
|
-
class BinaryLibs
|
5
|
-
class << self
|
6
|
-
def [](*libs)
|
7
|
-
libraries = Array.new
|
8
|
-
libs.each do |x|
|
9
|
-
libraries << BinaryLibrary.new(x)
|
10
|
-
end
|
11
|
-
libraries
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
class EvalContext
|
17
|
-
include Context
|
18
|
-
|
19
|
-
attr_accessor :all_blocks
|
20
|
-
|
21
|
-
# must be called to add building blocks
|
22
|
-
def cxx_configuration(&block)
|
23
|
-
@all_blocks = []
|
24
|
-
block.call
|
25
|
-
end
|
26
|
-
|
27
|
-
def eval_project(project_text, project_file, pwd)
|
28
|
-
@current_project_file = project_file
|
29
|
-
@current_working_dir = pwd
|
30
|
-
instance_eval(project_text)
|
31
|
-
end
|
32
|
-
|
33
|
-
# specify an executable
|
34
|
-
# hash supports:
|
35
|
-
# * :sources
|
36
|
-
# * :includes
|
37
|
-
# * :dependencies
|
38
|
-
# * :libpath
|
39
|
-
# * :output_dir
|
40
|
-
def exe(name, hash)
|
41
|
-
raise "not a hash" unless hash.is_a?(Hash)
|
42
|
-
check_hash(hash,[:sources,:includes,:dependencies,:libpath,:output_dir])
|
43
|
-
bblock = Executable.new(name)
|
44
|
-
bblock.set_sources(hash[:sources]) if hash.has_key?(:sources)
|
45
|
-
bblock.set_includes(get_as_array(hash, :includes)) if hash.has_key?(:includes)
|
46
|
-
calc_lib_searchpath(hash).each { |sp| bblock.add_lib_element(HasLibraries::SEARCH_PATH, sp) }
|
47
|
-
if hash.has_key?(:dependencies)
|
48
|
-
bblock.set_dependencies(hash[:dependencies])
|
49
|
-
hash[:dependencies].each { |d| bblock.add_lib_element(HasLibraries::DEPENDENCY, d) }
|
50
|
-
end
|
51
|
-
bblock.set_output_dir(hash[:output_dir]) if hash.has_key?(:output_dir)
|
52
|
-
all_blocks << bblock
|
53
|
-
end
|
54
|
-
|
55
|
-
def calc_lib_searchpath(hash)
|
56
|
-
if hash.has_key?(:libpath)
|
57
|
-
hash[:libpath]
|
58
|
-
else
|
59
|
-
if Utils::OS.linux? || Utils::OS.mac?
|
60
|
-
["/usr/local/lib","/usr/lib"]
|
61
|
-
elsif Utils::OS.windows?
|
62
|
-
["C:/tool/cygwin/lib", "C:/Tool/cygwin/usr/local/lib"]
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
# specify a sourcelib
|
68
|
-
# hash supports:
|
69
|
-
# * :sources
|
70
|
-
# * :includes
|
71
|
-
# * :dependencies
|
72
|
-
# * :toolchain
|
73
|
-
# * :file_dependencies
|
74
|
-
# * :output_dir
|
75
|
-
def source_lib(name, hash)
|
76
|
-
raise "not a hash" unless hash.is_a?(Hash)
|
77
|
-
check_hash(hash,[:sources, :includes, :dependencies, :toolchain, :file_dependencies, :output_dir])
|
78
|
-
raise ":sources need to be defined" unless hash.has_key?(:sources)
|
79
|
-
bblock = SourceLibrary.new(name)
|
80
|
-
bblock.set_sources(hash[:sources])
|
81
|
-
bblock.set_includes(get_as_array(hash, :includes)) if hash.has_key?(:includes)
|
82
|
-
bblock.set_tcs(hash[:toolchain]) if hash.has_key?(:toolchain)
|
83
|
-
if hash.has_key?(:dependencies)
|
84
|
-
bblock.set_dependencies(hash[:dependencies])
|
85
|
-
hash[:dependencies].each { |d| bblock.add_lib_element(HasLibraries::DEPENDENCY, d) }
|
86
|
-
end
|
87
|
-
bblock.file_dependencies = hash[:file_dependencies] if hash.has_key?(:file_dependencies)
|
88
|
-
bblock.set_output_dir(hash[:output_dir]) if hash.has_key?(:output_dir)
|
89
|
-
all_blocks << bblock
|
90
|
-
end
|
91
|
-
|
92
|
-
# specify some binary libs
|
93
|
-
# returns all binary libs as array
|
94
|
-
def bin_libs(*names)
|
95
|
-
res = []
|
96
|
-
mapped = names.map{|n|n.to_s}
|
97
|
-
mapped.each do |name|
|
98
|
-
res << BinaryLibrary.new(name)
|
99
|
-
end
|
100
|
-
mapped
|
101
|
-
end
|
102
|
-
|
103
|
-
def compile(name, hash)
|
104
|
-
raise "not a hash" unless hash.is_a?(Hash)
|
105
|
-
check_hash(hash,[:sources,:includes])
|
106
|
-
bblock = SingleSource.new(name)
|
107
|
-
bblock.set_sources(hash[:sources]) if hash.has_key?(:sources)
|
108
|
-
bblock.set_includes(hash[:includes]) if hash.has_key?(:includes)
|
109
|
-
all_blocks << bblock
|
110
|
-
end
|
111
|
-
|
112
|
-
def custom(name, hash)
|
113
|
-
raise "not a hash" unless hash.is_a?(Hash)
|
114
|
-
check_hash(hash,[:execute, :dependencies])
|
115
|
-
bblock = CustomBuildingBlock.new(name)
|
116
|
-
bblock.set_actions(hash[:execute]) if hash.has_key?(:execute)
|
117
|
-
if hash.has_key?(:dependencies)
|
118
|
-
bblock.set_dependencies(hash[:dependencies])
|
119
|
-
end
|
120
|
-
all_blocks << bblock
|
121
|
-
end
|
122
|
-
|
123
|
-
end
|
124
|
-
end
|