cxxproject 0.6.6 → 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cxxproject/buildingblocks/executable.rb +2 -1
- data/lib/cxxproject/ext/rake.rb +7 -1
- data/lib/cxxproject/torake.rb +32 -11
- data/lib/cxxproject/version.rb +1 -1
- metadata +53 -53
@@ -229,7 +229,8 @@ module Cxxproject
|
|
229
229
|
namespace 'run' do
|
230
230
|
desc "run executable #{executable}"
|
231
231
|
res = task name => executable do |t|
|
232
|
-
|
232
|
+
args = ENV['args'] ? ' ' + ENV['args'] : ''
|
233
|
+
sh "\"#{executable}\"#{args}"
|
233
234
|
end
|
234
235
|
res.type = Rake::Task::RUN
|
235
236
|
res
|
data/lib/cxxproject/ext/rake.rb
CHANGED
@@ -211,8 +211,14 @@ module Rake
|
|
211
211
|
end
|
212
212
|
|
213
213
|
class Task
|
214
|
+
@@bail_on_first_error = true
|
215
|
+
def self.bail_on_first_error
|
216
|
+
return @@bail_on_first_error
|
217
|
+
end
|
218
|
+
def self.bail_on_first_error=(v)
|
219
|
+
@@bail_on_first_error = v
|
220
|
+
end
|
214
221
|
class << self
|
215
|
-
attr_accessor :bail_on_first_error
|
216
222
|
attr_accessor :output_disabled
|
217
223
|
end
|
218
224
|
|
data/lib/cxxproject/torake.rb
CHANGED
@@ -22,7 +22,7 @@ module Cxxproject
|
|
22
22
|
attr_accessor :base_dir, :all_tasks
|
23
23
|
|
24
24
|
def initialize(projects, build_dir, toolchain_name, base_dir='.', &option_block)
|
25
|
-
|
25
|
+
load_toolchain_plugins
|
26
26
|
option_block.call if option_block
|
27
27
|
toolchain = Provider[toolchain_name]
|
28
28
|
raise "no provider with name \"#{toolchain_name}\" found" unless toolchain
|
@@ -45,18 +45,39 @@ module Cxxproject
|
|
45
45
|
create_generic_tasks
|
46
46
|
create_console_colorization
|
47
47
|
create_multitask
|
48
|
-
|
48
|
+
create_dont_bail_on_first_task
|
49
49
|
describe_clean_task
|
50
50
|
create_console_task
|
51
|
+
|
52
|
+
load_nontoolchain_plugins
|
51
53
|
end
|
52
54
|
|
53
|
-
def
|
54
|
-
|
55
|
-
|
56
|
-
gem
|
55
|
+
def find_gems
|
56
|
+
latest = Gem::Specification.latest_specs
|
57
|
+
latest.select do |gem|
|
58
|
+
yield(gem)
|
57
59
|
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def load_toolchain_plugins
|
63
|
+
toolchains = find_gems do |gem|
|
64
|
+
Regexp.new('cxxproject_(.+)toolchain').match(gem.name)
|
65
|
+
end
|
66
|
+
load_gems(toolchains)
|
67
|
+
end
|
68
|
+
|
69
|
+
def load_nontoolchain_plugins
|
70
|
+
cxx = Regexp.new('cxxproject_(.+)')
|
71
|
+
no_toolchain = Regexp.new('.*toolchain.*')
|
72
|
+
gems_to_load = find_gems do |gem|
|
73
|
+
cxx.match(gem.name) && !(no_toolchain.match(gem.name))
|
74
|
+
end
|
75
|
+
load_gems(gems_to_load)
|
76
|
+
end
|
77
|
+
|
78
|
+
def load_gems(gems)
|
58
79
|
context = PluginContext.new(self, ALL_BUILDING_BLOCKS, @log)
|
59
|
-
|
80
|
+
gems.each do |gem|
|
60
81
|
load_plugin(gem, context)
|
61
82
|
end
|
62
83
|
end
|
@@ -94,10 +115,10 @@ module Cxxproject
|
|
94
115
|
Rake::Task[:clean].add_description('clean')
|
95
116
|
end
|
96
117
|
|
97
|
-
def
|
98
|
-
desc '
|
99
|
-
task :
|
100
|
-
Rake::Task.bail_on_first_error =
|
118
|
+
def create_dont_bail_on_first_task
|
119
|
+
desc 'dont bail on first error'
|
120
|
+
task :dont_bail_on_first_error do
|
121
|
+
Rake::Task.bail_on_first_error = false
|
101
122
|
end
|
102
123
|
end
|
103
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.9
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- oliver mueller
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-07-
|
13
|
+
date: 2012-07-11 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: highline
|
@@ -54,78 +54,78 @@ extensions: []
|
|
54
54
|
extra_rdoc_files: []
|
55
55
|
|
56
56
|
files:
|
57
|
-
- lib/cxxproject.rb
|
58
|
-
- lib/tools/project_wizard.rb
|
59
|
-
- lib/cxxproject/context.rb
|
60
57
|
- lib/cxxproject/errorparser/error_parser.rb
|
58
|
+
- lib/cxxproject/utils/optional.rb
|
59
|
+
- lib/cxxproject/utils/cleanup.rb
|
60
|
+
- lib/cxxproject/utils/exit_helper.rb
|
61
|
+
- lib/cxxproject/utils/rbcurse_progress.rb
|
62
|
+
- lib/cxxproject/utils/process.rb
|
63
|
+
- lib/cxxproject/utils/ubigraph.rb
|
64
|
+
- lib/cxxproject/utils/printer.rb
|
65
|
+
- lib/cxxproject/utils/stats.rb
|
66
|
+
- lib/cxxproject/utils/rbcurse.rb
|
67
|
+
- lib/cxxproject/utils/progress_helper.rb
|
68
|
+
- lib/cxxproject/utils/rbcurse_executable_ext.rb
|
69
|
+
- lib/cxxproject/utils/utils.rb
|
70
|
+
- lib/cxxproject/utils/rbcurse_tasktable.rb
|
71
|
+
- lib/cxxproject/utils/console.rb
|
72
|
+
- lib/cxxproject/utils/progress.rb
|
73
|
+
- lib/cxxproject/utils/graphstream.rb
|
74
|
+
- lib/cxxproject/toolchain/provider.rb
|
75
|
+
- lib/cxxproject/toolchain/colorizing_formatter.rb
|
76
|
+
- lib/cxxproject/toolchain/toolchain.rb
|
61
77
|
- lib/cxxproject/version.rb
|
62
|
-
- lib/cxxproject/torake.rb
|
63
|
-
- lib/cxxproject/plugin_context.rb
|
64
78
|
- lib/cxxproject/ide_interface.rb
|
65
|
-
- lib/cxxproject/ext/
|
66
|
-
- lib/cxxproject/ext/rake_dirty.rb
|
79
|
+
- lib/cxxproject/ext/rake_listener.rb
|
67
80
|
- lib/cxxproject/ext/filelist.rb
|
68
81
|
- lib/cxxproject/ext/string.rb
|
69
|
-
- lib/cxxproject/ext/rake_listener.rb
|
70
|
-
- lib/cxxproject/ext/stdout.rb
|
71
82
|
- lib/cxxproject/ext/rake.rb
|
72
83
|
- lib/cxxproject/ext/progressbar.rb
|
84
|
+
- lib/cxxproject/ext/stdout.rb
|
85
|
+
- lib/cxxproject/ext/rake_dirty.rb
|
86
|
+
- lib/cxxproject/ext/file.rb
|
87
|
+
- lib/cxxproject/context.rb
|
88
|
+
- lib/cxxproject/plugin_context.rb
|
89
|
+
- lib/cxxproject/torake.rb
|
90
|
+
- lib/cxxproject/buildingblocks/building_block.rb
|
73
91
|
- lib/cxxproject/buildingblocks/has_libraries_mixin.rb
|
74
|
-
- lib/cxxproject/buildingblocks/executable.rb
|
75
|
-
- lib/cxxproject/buildingblocks/has_includes_mixin.rb
|
76
|
-
- lib/cxxproject/buildingblocks/has_dependencies_mixin.rb
|
77
92
|
- lib/cxxproject/buildingblocks/custom_building_block.rb
|
93
|
+
- lib/cxxproject/buildingblocks/makefile.rb
|
94
|
+
- lib/cxxproject/buildingblocks/has_includes_mixin.rb
|
95
|
+
- lib/cxxproject/buildingblocks/has_sources_mixin.rb
|
78
96
|
- lib/cxxproject/buildingblocks/binary_library.rb
|
97
|
+
- lib/cxxproject/buildingblocks/executable.rb
|
79
98
|
- lib/cxxproject/buildingblocks/module.rb
|
80
|
-
- lib/cxxproject/buildingblocks/building_block.rb
|
81
|
-
- lib/cxxproject/buildingblocks/source_library.rb
|
82
99
|
- lib/cxxproject/buildingblocks/single_source.rb
|
83
|
-
- lib/cxxproject/buildingblocks/
|
100
|
+
- lib/cxxproject/buildingblocks/has_dependencies_mixin.rb
|
101
|
+
- lib/cxxproject/buildingblocks/source_library.rb
|
84
102
|
- lib/cxxproject/buildingblocks/command_line.rb
|
85
|
-
- lib/cxxproject/buildingblocks/has_sources_mixin.rb
|
86
|
-
- lib/cxxproject/utils/rbcurse_progress.rb
|
87
|
-
- lib/cxxproject/utils/ubigraph.rb
|
88
|
-
- lib/cxxproject/utils/graphstream.rb
|
89
|
-
- lib/cxxproject/utils/progress.rb
|
90
|
-
- lib/cxxproject/utils/stats.rb
|
91
|
-
- lib/cxxproject/utils/utils.rb
|
92
|
-
- lib/cxxproject/utils/optional.rb
|
93
|
-
- lib/cxxproject/utils/console.rb
|
94
|
-
- lib/cxxproject/utils/progress_helper.rb
|
95
|
-
- lib/cxxproject/utils/exit_helper.rb
|
96
|
-
- lib/cxxproject/utils/cleanup.rb
|
97
|
-
- lib/cxxproject/utils/rbcurse_tasktable.rb
|
98
|
-
- lib/cxxproject/utils/rbcurse_executable_ext.rb
|
99
|
-
- lib/cxxproject/utils/rbcurse.rb
|
100
|
-
- lib/cxxproject/utils/printer.rb
|
101
|
-
- lib/cxxproject/utils/process.rb
|
102
|
-
- lib/cxxproject/toolchain/provider.rb
|
103
|
-
- lib/cxxproject/toolchain/toolchain.rb
|
104
|
-
- lib/cxxproject/toolchain/colorizing_formatter.rb
|
105
103
|
- lib/cxxproject/eval_context.rb
|
104
|
+
- lib/tools/project_wizard.rb
|
105
|
+
- lib/cxxproject.rb
|
106
106
|
- Rakefile.rb
|
107
|
-
- spec/testdata/onlyOneHeader/Rakefile.rb
|
108
|
-
- spec/testdata/onlyOneHeader/project.rb
|
109
|
-
- spec/testdata/basic/lib1/project.rb
|
110
|
-
- spec/testdata/basic/lib2/project.rb
|
111
|
-
- spec/testdata/basic/exe12/project.rb
|
112
|
-
- spec/testdata/multiple_levels/mainproject/basic/project.rb
|
113
|
-
- spec/testdata/multiple_levels/libs/lib1/project.rb
|
114
|
-
- spec/testdata/multiple_levels/libs/lib2/project.rb
|
115
107
|
- spec/string_spec.rb
|
116
|
-
- spec/cxxproject_2_rake_spec.rb
|
117
|
-
- spec/provider_spec.rb
|
118
108
|
- spec/project_path_spec.rb
|
109
|
+
- spec/ide_interface_spec.rb
|
110
|
+
- spec/spec_helper.rb
|
111
|
+
- spec/object_dependency_spec.rb
|
119
112
|
- spec/building_block_spec.rb
|
113
|
+
- spec/provider_spec.rb
|
120
114
|
- spec/plugin_context_spec.rb
|
121
115
|
- spec/file_ext_spec.rb
|
122
|
-
- spec/
|
123
|
-
- spec/
|
124
|
-
- spec/
|
125
|
-
- spec/
|
116
|
+
- spec/testdata/basic/exe12/project.rb
|
117
|
+
- spec/testdata/basic/lib1/project.rb
|
118
|
+
- spec/testdata/basic/lib2/project.rb
|
119
|
+
- spec/testdata/onlyOneHeader/Rakefile.rb
|
120
|
+
- spec/testdata/onlyOneHeader/project.rb
|
121
|
+
- spec/testdata/multiple_levels/libs/lib1/project.rb
|
122
|
+
- spec/testdata/multiple_levels/libs/lib2/project.rb
|
123
|
+
- spec/testdata/multiple_levels/mainproject/basic/project.rb
|
124
|
+
- spec/cxxproject_2_rake_spec.rb
|
126
125
|
- spec/toolchain_spec.rb
|
127
|
-
-
|
126
|
+
- spec/rake_listener_ext_spec.rb
|
128
127
|
- lib/tools/Rakefile.rb.template
|
128
|
+
- lib/tools/project.rb.template
|
129
129
|
- bin/cxx
|
130
130
|
homepage: https://github.com/marcmo/cxxproject
|
131
131
|
licenses: []
|
@@ -140,7 +140,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
140
140
|
requirements:
|
141
141
|
- - ">="
|
142
142
|
- !ruby/object:Gem::Version
|
143
|
-
hash: -
|
143
|
+
hash: -1123746913238393195
|
144
144
|
segments:
|
145
145
|
- 0
|
146
146
|
version: "0"
|