cxxproject 0.6.29 → 0.6.30
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +195 -65
- data/lib/cxxproject/buildingblocks/building_block.rb +1 -1
- data/lib/cxxproject/buildingblocks/executable.rb +3 -0
- data/lib/cxxproject/buildingblocks/has_dependencies_mixin.rb +5 -5
- data/lib/cxxproject/buildingblocks/has_sources_mixin.rb +30 -16
- data/lib/cxxproject/buildingblocks/single_source.rb +0 -1
- data/lib/cxxproject/ext/rake_listener.rb +11 -13
- data/lib/cxxproject/plugin_context.rb +6 -4
- data/lib/cxxproject/toolchain/colorizing_formatter.rb +8 -5
- data/lib/cxxproject/utils/printer.rb +6 -6
- data/lib/cxxproject/version.rb +1 -1
- data/lib/cxxproject.rb +0 -1
- metadata +37 -145
- data/.gitignore +0 -18
- data/.rvmrc +0 -1
- data/Gemfile +0 -6
- data/Gemfile.lock +0 -35
- data/Rakefile.rb +0 -125
- data/cxxproject.gemspec +0 -22
- data/example/.gitignore +0 -1
- data/example/Rakefile.rb +0 -35
- data/example/big_project/.gitignore +0 -2
- data/example/big_project/Rakefile_generator.rb +0 -80
- data/example/big_project/fak.h +0 -9
- data/example/custom/.gitignore +0 -1
- data/example/custom/Rakefile.rb +0 -12
- data/example/custom/foo.cpp +0 -5
- data/example/custom/project.rb +0 -27
- data/example/dependency_tests/Rakefile.rb +0 -3
- data/example/dependency_tests/help1.h +0 -12
- data/example/dependency_tests/help2.h +0 -10
- data/example/dependency_tests/main.cpp +0 -6
- data/example/dependency_tests/project.rb +0 -3
- data/example/generator/Rakefile.rb +0 -12
- data/example/generator/main/main.cpp +0 -3
- data/example/generator/main/project/project.rb +0 -3
- data/example/oneFileOnly/Rakefile.rb +0 -3
- data/example/oneFileOnly/config.h +0 -2
- data/example/oneFileOnly/main.cpp +0 -8
- data/example/oneFileOnly/project_compile.rb +0 -3
- data/example/protobuf/.gitignore +0 -4
- data/example/protobuf/Rakefile.rb +0 -70
- data/example/protobuf/addressbook/addressbook.proto +0 -24
- data/example/protobuf/addressbook/addressbook_read.cc +0 -67
- data/example/protobuf/addressbook/addressbook_write.cc +0 -93
- data/example/protobuf/addressbook/project.rb +0 -16
- data/example/protobuf/protobuf.files +0 -37
- data/example/protobuf/protobuf_project.rb +0 -9
- data/example/simpleUnitTest/Rakefile.rb +0 -4
- data/example/simpleUnitTest/atest.cpp +0 -16
- data/example/simpleUnitTest/atest.h +0 -11
- data/example/simpleUnitTest/project.rb +0 -5
- data/example/simpleUnitTest/test.cpp +0 -13
- data/example/strange_dirs/Rakefile.rb +0 -4
- data/example/strange_dirs/lazyLib/project.rb +0 -5
- data/example/strange_dirs/main/main.cpp +0 -5
- data/example/strange_dirs/main/project.rb +0 -5
- data/example/strange_dirs/src/test.cpp +0 -4
- data/example/test.rb +0 -10
- data/example/three_tests/Rakefile.rb +0 -5
- data/example/three_tests/allsuites/project.rb +0 -4
- data/example/three_tests/main/main.cpp +0 -13
- data/example/three_tests/main/project.rb +0 -5
- data/example/three_tests/suite1/project.rb +0 -6
- data/example/three_tests/suite1/suite1.cpp +0 -3
- data/example/three_tests/suite1/suite1.h +0 -28
- data/example/three_tests/suite2/project.rb +0 -6
- data/example/three_tests/suite2/suite2.cpp +0 -3
- data/example/three_tests/suite2/suite2.h +0 -29
- data/junit.rb +0 -91
- data/lib/cxxproject/ext/string.rb +0 -9
- data/plugins/tmp/.rvmrc +0 -1
- data/plugins/tmp/BuildDir/objects/testme/test.o +0 -0
- data/plugins/tmp/BuildDir/objects/testme/test.o.d +0 -1
- data/plugins/tmp/BuildDir/testme.exe +0 -0
- data/plugins/tmp/Rakefile.rb +0 -6
- data/plugins/tmp/project.rb +0 -6
- data/plugins/tmp/reinstall/Rakefile.rb +0 -15
- data/plugins/tmp/test.cpp +0 -7
- data/rake_helper/perftools.rb +0 -34
- data/rake_helper/spec.rb +0 -65
- data/roodi.yml +0 -8
- data/spec/building_block_spec.rb +0 -103
- data/spec/file_ext_spec.rb +0 -30
- data/spec/ide_interface_spec.rb +0 -41
- data/spec/plugin_context_spec.rb +0 -57
- data/spec/provider_spec.rb +0 -39
- data/spec/rake_listener_ext_spec.rb +0 -58
- data/spec/spec_helper.rb +0 -18
- data/spec/string_spec.rb +0 -11
- data/spec/testdata/basic/exe12/help.cpp +0 -5
- data/spec/testdata/basic/exe12/help.h +0 -6
- data/spec/testdata/basic/exe12/main.cpp +0 -10
- data/spec/testdata/basic/exe12/project.rb +0 -5
- data/spec/testdata/basic/lib1/lib1.cpp +0 -7
- data/spec/testdata/basic/lib1/lib1.h +0 -8
- data/spec/testdata/basic/lib1/project.rb +0 -5
- data/spec/testdata/basic/lib2/lib2.cpp +0 -17
- data/spec/testdata/basic/lib2/lib2.h +0 -6
- data/spec/testdata/basic/lib2/project.rb +0 -8
- data/spec/testdata/multiple_levels/libs/lib1/lib1.cpp +0 -7
- data/spec/testdata/multiple_levels/libs/lib1/lib1.h +0 -8
- data/spec/testdata/multiple_levels/libs/lib1/project.rb +0 -5
- data/spec/testdata/multiple_levels/libs/lib2/lib2.cpp +0 -21
- data/spec/testdata/multiple_levels/libs/lib2/lib2.h +0 -6
- data/spec/testdata/multiple_levels/libs/lib2/project.rb +0 -19
- data/spec/testdata/multiple_levels/mainproject/basic/help.cpp +0 -5
- data/spec/testdata/multiple_levels/mainproject/basic/help.h +0 -6
- data/spec/testdata/multiple_levels/mainproject/basic/main.cpp +0 -10
- data/spec/testdata/multiple_levels/mainproject/basic/project.rb +0 -8
- data/spec/testdata/onlyOneHeader/.gitignore +0 -1
- data/spec/testdata/onlyOneHeader/Rakefile.rb +0 -4
- data/spec/testdata/onlyOneHeader/help.cpp +0 -5
- data/spec/testdata/onlyOneHeader/help.h +0 -7
- data/spec/testdata/onlyOneHeader/main.cpp +0 -8
- data/spec/testdata/onlyOneHeader/project.rb +0 -4
- data/spec/testdata/onlyOneHeader/testin.c +0 -0
- data/spec/toolchain_spec.rb +0 -29
@@ -22,31 +22,29 @@ module Rake
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
|
26
|
-
invoke_prerequisites_original = self.instance_method(:invoke_prerequisites)
|
27
|
-
define_method(:invoke_prerequisites) do |task_args, invocation_chain|
|
25
|
+
def self.augmented_invoke_prerequisites(o, name, invoke_prerequisites_original, obj, task_args, invocation_chain)
|
28
26
|
Rake::notify_listener(:before_prerequisites, name)
|
29
|
-
invoke_prerequisites_original.bind(
|
27
|
+
invoke_prerequisites_original.bind(obj).call(task_args, invocation_chain)
|
30
28
|
Rake::notify_listener(:after_prerequisites, name)
|
31
|
-
if !needed?
|
29
|
+
if !o.needed?
|
32
30
|
Rake::notify_listener(:after_execute, name)
|
33
31
|
end
|
32
|
+
end
|
33
|
+
|
34
|
+
class MultiTask
|
35
|
+
invoke_prerequisites_original = self.instance_method(:invoke_prerequisites)
|
36
|
+
define_method(:invoke_prerequisites) do |task_args, invocation_chain|
|
37
|
+
Rake::augmented_invoke_prerequisites(self, name, invoke_prerequisites_original, self, task_args, invocation_chain)
|
34
38
|
end
|
35
39
|
end
|
36
40
|
|
37
41
|
class Task
|
38
42
|
invoke_prerequisites_original = self.instance_method(:invoke_prerequisites)
|
39
|
-
execute_original = self.instance_method(:execute)
|
40
|
-
|
41
43
|
define_method (:invoke_prerequisites) do |task_args, invocation_chain|
|
42
|
-
Rake::
|
43
|
-
invoke_prerequisites_original.bind(self).call(task_args, invocation_chain)
|
44
|
-
Rake::notify_listener(:after_prerequisites, name)
|
45
|
-
if !needed?
|
46
|
-
Rake::notify_listener(:after_execute, name)
|
47
|
-
end
|
44
|
+
Rake::augmented_invoke_prerequisites(self, name, invoke_prerequisites_original, self, task_args, invocation_chain)
|
48
45
|
end
|
49
46
|
|
47
|
+
execute_original = self.instance_method(:execute)
|
50
48
|
define_method(:execute) do |args|
|
51
49
|
Rake::notify_listener(:before_execute, name)
|
52
50
|
execute_original.bind(self).call(args)
|
@@ -101,13 +101,15 @@ module Cxxproject
|
|
101
101
|
return res[0] if res.length > 0
|
102
102
|
end
|
103
103
|
|
104
|
-
|
104
|
+
def check_compiler_hash(hash, sym)
|
105
|
+
check_hash(hash[sym], Cxxproject::Toolchain::Provider.default[:COMPILER][sym].keys << :BASED_ON) if hash[sym]
|
106
|
+
end
|
105
107
|
def check_compiler(hash)
|
106
108
|
raise "not a hash" unless hash.is_a?(Hash)
|
107
109
|
check_hash(hash, Cxxproject::Toolchain::Provider.default[:COMPILER].keys)
|
108
|
-
|
109
|
-
|
110
|
-
|
110
|
+
[:CPP, :C, :ASM].each do |sym|
|
111
|
+
check_compiler_hash(hash, sym)
|
112
|
+
end
|
111
113
|
end
|
112
114
|
|
113
115
|
def check_linker(hash)
|
@@ -37,24 +37,27 @@ module Cxxproject
|
|
37
37
|
end
|
38
38
|
ColorizingFormatter.setColorScheme(:black) # default
|
39
39
|
|
40
|
+
def print_color_style(str, color, style)
|
41
|
+
[color, style].inject(str) {|m,x| m.send(x)}
|
42
|
+
end
|
40
43
|
def printError(str)
|
41
|
-
|
44
|
+
print_color_style(str, @@error_color, :bold)
|
42
45
|
end
|
43
46
|
|
44
47
|
def printWarning(str)
|
45
|
-
|
48
|
+
print_color_style(str, @@warning_color, :bold)
|
46
49
|
end
|
47
50
|
|
48
51
|
def printInfo(str)
|
49
|
-
|
52
|
+
print_color_style(str, @@info_color, :bold)
|
50
53
|
end
|
51
54
|
|
52
55
|
def printAdditionalInfo(str)
|
53
|
-
|
56
|
+
print_color_style(str, @@additional_info_color, :bold)
|
54
57
|
end
|
55
58
|
|
56
59
|
def printSuccess(str)
|
57
|
-
|
60
|
+
print_color_style(str, @@success_color, :bold)
|
58
61
|
end
|
59
62
|
|
60
63
|
# formats several lines of usually compiler output
|
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'cxxproject/toolchain/colorizing_formatter'
|
2
2
|
|
3
3
|
module Cxxproject
|
4
|
-
|
4
|
+
|
5
5
|
class Printer
|
6
6
|
@@cf = ColorizingFormatter.new
|
7
|
-
|
7
|
+
|
8
8
|
def self.printInfo(str)
|
9
9
|
if @@cf.enabled?
|
10
10
|
puts @@cf.printInfo(str)
|
@@ -12,7 +12,7 @@ module Cxxproject
|
|
12
12
|
puts str
|
13
13
|
end
|
14
14
|
end
|
15
|
-
|
15
|
+
|
16
16
|
def self.printAdditionalInfo(str)
|
17
17
|
if @@cf.enabled?
|
18
18
|
puts @@cf.printAdditionalInfo(str)
|
@@ -20,7 +20,7 @@ module Cxxproject
|
|
20
20
|
puts str
|
21
21
|
end
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
def self.printWarning(str)
|
25
25
|
if @@cf.enabled?
|
26
26
|
puts @@cf.printWarning(str)
|
@@ -44,7 +44,7 @@ module Cxxproject
|
|
44
44
|
puts str
|
45
45
|
end
|
46
46
|
end
|
47
|
-
|
47
|
+
|
48
48
|
end
|
49
|
-
|
49
|
+
|
50
50
|
end
|
data/lib/cxxproject/version.rb
CHANGED
data/lib/cxxproject.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cxxproject
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.30
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colored
|
@@ -51,158 +51,53 @@ executables: []
|
|
51
51
|
extensions: []
|
52
52
|
extra_rdoc_files: []
|
53
53
|
files:
|
54
|
-
- .gitignore
|
55
|
-
- .rvmrc
|
56
|
-
- Gemfile
|
57
|
-
- Gemfile.lock
|
58
|
-
- LICENSE
|
59
|
-
- README.md
|
60
|
-
- Rakefile.rb
|
61
|
-
- cxxproject.gemspec
|
62
|
-
- example/.gitignore
|
63
|
-
- example/Rakefile.rb
|
64
|
-
- example/big_project/.gitignore
|
65
|
-
- example/big_project/Rakefile_generator.rb
|
66
|
-
- example/big_project/fak.h
|
67
|
-
- example/custom/.gitignore
|
68
|
-
- example/custom/Rakefile.rb
|
69
|
-
- example/custom/foo.cpp
|
70
|
-
- example/custom/project.rb
|
71
|
-
- example/dependency_tests/Rakefile.rb
|
72
|
-
- example/dependency_tests/help1.h
|
73
|
-
- example/dependency_tests/help2.h
|
74
|
-
- example/dependency_tests/main.cpp
|
75
|
-
- example/dependency_tests/project.rb
|
76
|
-
- example/generator/Rakefile.rb
|
77
|
-
- example/generator/main/main.cpp
|
78
|
-
- example/generator/main/project/project.rb
|
79
|
-
- example/oneFileOnly/Rakefile.rb
|
80
|
-
- example/oneFileOnly/config.h
|
81
|
-
- example/oneFileOnly/main.cpp
|
82
|
-
- example/oneFileOnly/project_compile.rb
|
83
|
-
- example/protobuf/.gitignore
|
84
|
-
- example/protobuf/Rakefile.rb
|
85
|
-
- example/protobuf/addressbook/addressbook.proto
|
86
|
-
- example/protobuf/addressbook/addressbook_read.cc
|
87
|
-
- example/protobuf/addressbook/addressbook_write.cc
|
88
|
-
- example/protobuf/addressbook/project.rb
|
89
|
-
- example/protobuf/protobuf.files
|
90
|
-
- example/protobuf/protobuf_project.rb
|
91
|
-
- example/simpleUnitTest/Rakefile.rb
|
92
|
-
- example/simpleUnitTest/atest.cpp
|
93
|
-
- example/simpleUnitTest/atest.h
|
94
|
-
- example/simpleUnitTest/project.rb
|
95
|
-
- example/simpleUnitTest/test.cpp
|
96
|
-
- example/strange_dirs/Rakefile.rb
|
97
|
-
- example/strange_dirs/lazyLib/project.rb
|
98
|
-
- example/strange_dirs/main/main.cpp
|
99
|
-
- example/strange_dirs/main/project.rb
|
100
|
-
- example/strange_dirs/src/test.cpp
|
101
|
-
- example/test.rb
|
102
|
-
- example/three_tests/Rakefile.rb
|
103
|
-
- example/three_tests/allsuites/project.rb
|
104
|
-
- example/three_tests/main/main.cpp
|
105
|
-
- example/three_tests/main/project.rb
|
106
|
-
- example/three_tests/suite1/project.rb
|
107
|
-
- example/three_tests/suite1/suite1.cpp
|
108
|
-
- example/three_tests/suite1/suite1.h
|
109
|
-
- example/three_tests/suite2/project.rb
|
110
|
-
- example/three_tests/suite2/suite2.cpp
|
111
|
-
- example/three_tests/suite2/suite2.h
|
112
|
-
- junit.rb
|
113
54
|
- lib/cxxproject.rb
|
114
|
-
- lib/cxxproject/buildingblocks/binary_library.rb
|
115
|
-
- lib/cxxproject/buildingblocks/building_block.rb
|
116
|
-
- lib/cxxproject/buildingblocks/building_blocks.rb
|
117
|
-
- lib/cxxproject/buildingblocks/command_line.rb
|
118
|
-
- lib/cxxproject/buildingblocks/custom_building_block.rb
|
119
|
-
- lib/cxxproject/buildingblocks/executable.rb
|
120
|
-
- lib/cxxproject/buildingblocks/has_dependencies_mixin.rb
|
121
|
-
- lib/cxxproject/buildingblocks/has_includes_mixin.rb
|
122
|
-
- lib/cxxproject/buildingblocks/has_libraries_mixin.rb
|
123
|
-
- lib/cxxproject/buildingblocks/has_sources_mixin.rb
|
124
|
-
- lib/cxxproject/buildingblocks/makefile.rb
|
125
|
-
- lib/cxxproject/buildingblocks/module.rb
|
126
|
-
- lib/cxxproject/buildingblocks/single_source.rb
|
127
|
-
- lib/cxxproject/buildingblocks/source_library.rb
|
128
55
|
- lib/cxxproject/context.rb
|
129
56
|
- lib/cxxproject/errorparser/error_parser.rb
|
57
|
+
- lib/cxxproject/version.rb
|
58
|
+
- lib/cxxproject/plugin_context.rb
|
59
|
+
- lib/cxxproject/ide_interface.rb
|
130
60
|
- lib/cxxproject/ext/file.rb
|
131
|
-
- lib/cxxproject/ext/filelist.rb
|
132
61
|
- lib/cxxproject/ext/hash.rb
|
133
|
-
- lib/cxxproject/ext/progressbar.rb
|
134
|
-
- lib/cxxproject/ext/rake.rb
|
135
62
|
- lib/cxxproject/ext/rake_dirty.rb
|
63
|
+
- lib/cxxproject/ext/filelist.rb
|
136
64
|
- lib/cxxproject/ext/rake_listener.rb
|
137
65
|
- lib/cxxproject/ext/stdout.rb
|
138
|
-
- lib/cxxproject/ext/
|
139
|
-
- lib/cxxproject/
|
140
|
-
- lib/cxxproject/
|
141
|
-
- lib/cxxproject/
|
142
|
-
- lib/cxxproject/
|
143
|
-
- lib/cxxproject/
|
144
|
-
- lib/cxxproject/
|
145
|
-
- lib/cxxproject/
|
66
|
+
- lib/cxxproject/ext/rake.rb
|
67
|
+
- lib/cxxproject/ext/progressbar.rb
|
68
|
+
- lib/cxxproject/buildingblocks/has_libraries_mixin.rb
|
69
|
+
- lib/cxxproject/buildingblocks/executable.rb
|
70
|
+
- lib/cxxproject/buildingblocks/has_includes_mixin.rb
|
71
|
+
- lib/cxxproject/buildingblocks/has_dependencies_mixin.rb
|
72
|
+
- lib/cxxproject/buildingblocks/custom_building_block.rb
|
73
|
+
- lib/cxxproject/buildingblocks/binary_library.rb
|
74
|
+
- lib/cxxproject/buildingblocks/module.rb
|
75
|
+
- lib/cxxproject/buildingblocks/building_block.rb
|
76
|
+
- lib/cxxproject/buildingblocks/source_library.rb
|
77
|
+
- lib/cxxproject/buildingblocks/building_blocks.rb
|
78
|
+
- lib/cxxproject/buildingblocks/single_source.rb
|
79
|
+
- lib/cxxproject/buildingblocks/makefile.rb
|
80
|
+
- lib/cxxproject/buildingblocks/command_line.rb
|
81
|
+
- lib/cxxproject/buildingblocks/has_sources_mixin.rb
|
82
|
+
- lib/cxxproject/utils/rbcurse_progress.rb
|
83
|
+
- lib/cxxproject/utils/ubigraph.rb
|
146
84
|
- lib/cxxproject/utils/graphstream.rb
|
147
|
-
- lib/cxxproject/utils/optional.rb
|
148
|
-
- lib/cxxproject/utils/printer.rb
|
149
|
-
- lib/cxxproject/utils/process.rb
|
150
85
|
- lib/cxxproject/utils/progress.rb
|
86
|
+
- lib/cxxproject/utils/utils.rb
|
87
|
+
- lib/cxxproject/utils/optional.rb
|
151
88
|
- lib/cxxproject/utils/progress_helper.rb
|
152
|
-
- lib/cxxproject/utils/
|
153
|
-
- lib/cxxproject/utils/
|
154
|
-
- lib/cxxproject/utils/rbcurse_progress.rb
|
89
|
+
- lib/cxxproject/utils/exit_helper.rb
|
90
|
+
- lib/cxxproject/utils/cleanup.rb
|
155
91
|
- lib/cxxproject/utils/rbcurse_tasktable.rb
|
156
|
-
- lib/cxxproject/utils/
|
157
|
-
- lib/cxxproject/utils/
|
158
|
-
- lib/cxxproject/
|
159
|
-
-
|
160
|
-
-
|
161
|
-
-
|
162
|
-
-
|
163
|
-
-
|
164
|
-
-
|
165
|
-
- plugins/tmp/reinstall/Rakefile.rb
|
166
|
-
- plugins/tmp/test.cpp
|
167
|
-
- rake_helper/perftools.rb
|
168
|
-
- rake_helper/spec.rb
|
169
|
-
- roodi.yml
|
170
|
-
- spec/building_block_spec.rb
|
171
|
-
- spec/file_ext_spec.rb
|
172
|
-
- spec/ide_interface_spec.rb
|
173
|
-
- spec/plugin_context_spec.rb
|
174
|
-
- spec/provider_spec.rb
|
175
|
-
- spec/rake_listener_ext_spec.rb
|
176
|
-
- spec/spec_helper.rb
|
177
|
-
- spec/string_spec.rb
|
178
|
-
- spec/testdata/basic/exe12/help.cpp
|
179
|
-
- spec/testdata/basic/exe12/help.h
|
180
|
-
- spec/testdata/basic/exe12/main.cpp
|
181
|
-
- spec/testdata/basic/exe12/project.rb
|
182
|
-
- spec/testdata/basic/lib1/lib1.cpp
|
183
|
-
- spec/testdata/basic/lib1/lib1.h
|
184
|
-
- spec/testdata/basic/lib1/project.rb
|
185
|
-
- spec/testdata/basic/lib2/lib2.cpp
|
186
|
-
- spec/testdata/basic/lib2/lib2.h
|
187
|
-
- spec/testdata/basic/lib2/project.rb
|
188
|
-
- spec/testdata/multiple_levels/libs/lib1/lib1.cpp
|
189
|
-
- spec/testdata/multiple_levels/libs/lib1/lib1.h
|
190
|
-
- spec/testdata/multiple_levels/libs/lib1/project.rb
|
191
|
-
- spec/testdata/multiple_levels/libs/lib2/lib2.cpp
|
192
|
-
- spec/testdata/multiple_levels/libs/lib2/lib2.h
|
193
|
-
- spec/testdata/multiple_levels/libs/lib2/project.rb
|
194
|
-
- spec/testdata/multiple_levels/mainproject/basic/help.cpp
|
195
|
-
- spec/testdata/multiple_levels/mainproject/basic/help.h
|
196
|
-
- spec/testdata/multiple_levels/mainproject/basic/main.cpp
|
197
|
-
- spec/testdata/multiple_levels/mainproject/basic/project.rb
|
198
|
-
- spec/testdata/onlyOneHeader/.gitignore
|
199
|
-
- spec/testdata/onlyOneHeader/Rakefile.rb
|
200
|
-
- spec/testdata/onlyOneHeader/help.cpp
|
201
|
-
- spec/testdata/onlyOneHeader/help.h
|
202
|
-
- spec/testdata/onlyOneHeader/main.cpp
|
203
|
-
- spec/testdata/onlyOneHeader/project.rb
|
204
|
-
- spec/testdata/onlyOneHeader/testin.c
|
205
|
-
- spec/toolchain_spec.rb
|
92
|
+
- lib/cxxproject/utils/rbcurse_executable_ext.rb
|
93
|
+
- lib/cxxproject/utils/rbcurse.rb
|
94
|
+
- lib/cxxproject/utils/printer.rb
|
95
|
+
- lib/cxxproject/utils/process.rb
|
96
|
+
- lib/cxxproject/toolchain/provider.rb
|
97
|
+
- lib/cxxproject/toolchain/toolchain.rb
|
98
|
+
- lib/cxxproject/toolchain/colorizing_formatter.rb
|
99
|
+
- LICENSE
|
100
|
+
- README.md
|
206
101
|
homepage: https://github.com/marcmo/cxxproject
|
207
102
|
licenses: []
|
208
103
|
post_install_message:
|
@@ -215,9 +110,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
215
110
|
- - ! '>='
|
216
111
|
- !ruby/object:Gem::Version
|
217
112
|
version: '0'
|
218
|
-
segments:
|
219
|
-
- 0
|
220
|
-
hash: 4389251987030978626
|
221
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
114
|
none: false
|
223
115
|
requirements:
|
data/.gitignore
DELETED
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm use 1.9.3@cxxproject --create
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
builder (3.1.3)
|
5
|
-
diff-lcs (1.1.3)
|
6
|
-
frazzle (0.1.3)
|
7
|
-
grit (2.5.0)
|
8
|
-
diff-lcs (~> 1.1)
|
9
|
-
mime-types (~> 1.15)
|
10
|
-
posix-spawn (~> 0.3.6)
|
11
|
-
mime-types (1.19)
|
12
|
-
posix-spawn (0.3.6)
|
13
|
-
roodi (2.1.0)
|
14
|
-
ruby_parser
|
15
|
-
rspec (2.11.0)
|
16
|
-
rspec-core (~> 2.11.0)
|
17
|
-
rspec-expectations (~> 2.11.0)
|
18
|
-
rspec-mocks (~> 2.11.0)
|
19
|
-
rspec-core (2.11.1)
|
20
|
-
rspec-expectations (2.11.3)
|
21
|
-
diff-lcs (~> 1.1.3)
|
22
|
-
rspec-mocks (2.11.2)
|
23
|
-
ruby_parser (2.3.1)
|
24
|
-
sexp_processor (~> 3.0)
|
25
|
-
sexp_processor (3.2.0)
|
26
|
-
|
27
|
-
PLATFORMS
|
28
|
-
ruby
|
29
|
-
|
30
|
-
DEPENDENCIES
|
31
|
-
builder
|
32
|
-
frazzle
|
33
|
-
grit
|
34
|
-
roodi
|
35
|
-
rspec
|
data/Rakefile.rb
DELETED
@@ -1,125 +0,0 @@
|
|
1
|
-
require 'rake/clean'
|
2
|
-
require './rake_helper/spec.rb'
|
3
|
-
|
4
|
-
desc "Default Task"
|
5
|
-
task :default => [:install]
|
6
|
-
|
7
|
-
|
8
|
-
begin
|
9
|
-
require 'rubygems/package_task'
|
10
|
-
spec = Gem::Specification.load('cxxproject.gemspec')
|
11
|
-
Gem::PackageTask.new(spec){|pkg|}
|
12
|
-
|
13
|
-
desc "install gem globally"
|
14
|
-
task :install => [:gem] do
|
15
|
-
sh "gem install pkg/#{spec.name}-#{spec.version}.gem"
|
16
|
-
end
|
17
|
-
|
18
|
-
desc "deploy gem to rubygems"
|
19
|
-
task :deploy => :gem do
|
20
|
-
require 'highline/import'
|
21
|
-
new_gem = "pkg/#{spec.name}-#{spec.version}.gem"
|
22
|
-
say "This will deploy #{new_gem} to rubygems server"
|
23
|
-
if agree("Are you sure you want to continue? [y/n]") then
|
24
|
-
sh "gem push #{new_gem}"
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
begin
|
29
|
-
require 'rdoc'
|
30
|
-
require 'rdoc/task'
|
31
|
-
RDoc::Task.new do |rd|
|
32
|
-
rd.rdoc_files.include(spec.files)
|
33
|
-
end
|
34
|
-
rescue LoadError => e
|
35
|
-
task :rdoc do
|
36
|
-
puts 'please gem install rdoc'
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
# begin
|
41
|
-
# require 'roodi'
|
42
|
-
# require 'roodi_task'
|
43
|
-
# class RoodiTask
|
44
|
-
# def define
|
45
|
-
# # copied from roodi_task.rb
|
46
|
-
# desc "Check for design issues in: #{patterns.join(', ')}"
|
47
|
-
# task name do
|
48
|
-
# runner = Roodi::Core::Runner.new
|
49
|
-
# runner.config = config if config
|
50
|
-
# patterns.each do |pattern|
|
51
|
-
# Dir.glob(pattern).each { |file| runner.check_file(file) }
|
52
|
-
# end
|
53
|
-
# runner.errors.each {|error| puts error}
|
54
|
-
# # raise "Found #{runner.errors.size} errors." unless runner.errors.empty?
|
55
|
-
# end
|
56
|
-
# self
|
57
|
-
# end
|
58
|
-
# end
|
59
|
-
# RoodiTask.new('roodi', spec.files)
|
60
|
-
# task :gem => [:roodi]
|
61
|
-
# rescue LoadError # don't bail out when people do not have roodi installed!
|
62
|
-
# puts 'please gem install roodi'
|
63
|
-
# end
|
64
|
-
rescue LoadError => e
|
65
|
-
puts "please missing gems #{e}"
|
66
|
-
end
|
67
|
-
|
68
|
-
def two_digits(x)
|
69
|
-
if x.length > 1
|
70
|
-
x
|
71
|
-
else
|
72
|
-
"0#{x}"
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
begin
|
77
|
-
require 'grit'
|
78
|
-
include Grit
|
79
|
-
|
80
|
-
def git_history
|
81
|
-
repo = Repo.new('.')
|
82
|
-
tag_names = repo.tags.collect {|t| t.name }
|
83
|
-
relevant_tags = repo.tags.reject {|t| !t.name.start_with?("v_")}
|
84
|
-
sorted_tags = relevant_tags.sort_by.each do |t|
|
85
|
-
/v_(?<x>\d+)\.(?<y>\d+)\.(?<z>\d+)/ =~ t.name
|
86
|
-
"#{two_digits(x)}-#{two_digits(y)}-#{two_digits(z)}"
|
87
|
-
end
|
88
|
-
|
89
|
-
change_text = []
|
90
|
-
zipped = sorted_tags[0..-2].zip(sorted_tags[1..-1])
|
91
|
-
zipped.reverse.each do |a,b|
|
92
|
-
change_text << ""
|
93
|
-
change_text << "#{a.name} => #{b.name}"
|
94
|
-
change_text << ""
|
95
|
-
cs = repo.commits_between(a.commit, b.commit)
|
96
|
-
cm = cs.each do |c|
|
97
|
-
change_lines = c.message.lines.to_a
|
98
|
-
first = change_lines.first
|
99
|
-
change_text << " * " + first + "#{change_lines[1..-1].collect {|l| " #{l}"}.join("")}"
|
100
|
-
end
|
101
|
-
end
|
102
|
-
change_text
|
103
|
-
end
|
104
|
-
|
105
|
-
desc 'generate version history'
|
106
|
-
task :generate_history do
|
107
|
-
puts git_history
|
108
|
-
end
|
109
|
-
|
110
|
-
desc 'generate and update version history'
|
111
|
-
task :update_version_history do
|
112
|
-
change_line = "## Change History:"
|
113
|
-
readme = 'README.md'
|
114
|
-
content = File.read(readme)
|
115
|
-
File.open(readme, 'w') do |f|
|
116
|
-
f.puts content.gsub(/^#{change_line}.*/m, ([change_line] << git_history).join("\n"))
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
rescue LoadError => e
|
121
|
-
puts 'to build the version history please gem install grit'
|
122
|
-
end
|
123
|
-
|
124
|
-
require './rake_helper/perftools'
|
125
|
-
|
data/cxxproject.gemspec
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
gem_name = 'cxxproject'
|
3
|
-
require File.expand_path("lib/#{gem_name}/version")
|
4
|
-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = gem_name
|
8
|
-
s.version = Cxxproject::VERSION
|
9
|
-
|
10
|
-
s.summary = "Cpp Support for Rake."
|
11
|
-
s.description = <<-EOF
|
12
|
-
Some more high level building blocks for cpp projects.
|
13
|
-
EOF
|
14
|
-
s.files = `git ls-files`.split($\)
|
15
|
-
s.require_path = 'lib'
|
16
|
-
s.author = 'oliver mueller'
|
17
|
-
s.email = 'oliver.mueller@gmail.com'
|
18
|
-
s.homepage = 'https://github.com/marcmo/cxxproject'
|
19
|
-
|
20
|
-
s.add_dependency('colored')
|
21
|
-
s.add_dependency('frazzle')
|
22
|
-
end
|
data/example/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
build
|
data/example/Rakefile.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
desc 'clean examples'
|
2
|
-
task :clean do
|
3
|
-
run_rakefiles{ sh "rake clobber" }
|
4
|
-
end
|
5
|
-
|
6
|
-
desc 'build examples'
|
7
|
-
task :all do
|
8
|
-
run_rakefiles { sh "rake" }
|
9
|
-
end
|
10
|
-
|
11
|
-
desc "run executables"
|
12
|
-
task :execute => [:all] do
|
13
|
-
Dir['**/*.exe'].each do |f|
|
14
|
-
sh f do |ok, res|
|
15
|
-
puts "#{f} => #{ok}"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
task :default => :execute
|
21
|
-
|
22
|
-
Testprojects = [
|
23
|
-
'basic',
|
24
|
-
# 'ckLayout', => needs to be fixed
|
25
|
-
'dependency_tests',
|
26
|
-
'simpleUnitTest',
|
27
|
-
'three_tests']
|
28
|
-
def run_rakefiles()
|
29
|
-
Testprojects.each do |p|
|
30
|
-
cd p do
|
31
|
-
dir = File.dirname('Rakefile.rb')
|
32
|
-
yield
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|