ritsu 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
File without changes
data/bin/ritsu CHANGED
File without changes
@@ -24,6 +24,7 @@ module Ritsu
24
24
  if cu_files.length == 0
25
25
  return
26
26
  end
27
+ cu_files.sort! {|x,y| x.src_path <=> y.src_path}
27
28
 
28
29
  block.add_line "CUDA_COMPILE(#{cuda_generate_files_var_name}"
29
30
  block.indent
@@ -15,6 +15,7 @@ module Ritsu
15
15
  block.contents.clear
16
16
 
17
17
  to_install = project.targets.select { |x| x.install? }
18
+ to_install.sort! {|x,y| x.name <=> y.name }
18
19
 
19
20
  if project.performs_fake_install? && to_install.length > 0
20
21
  block.add_line "ADD_CUSTOM_TARGET(fake_install"
@@ -31,7 +31,7 @@ module Ritsu
31
31
 
32
32
  def self.validate_instance(instance)
33
33
  if instances.select { |x| x.name == instance.name }.length > 0
34
- raise ArgumentError.new "external library with name '#{instance.name}' already exists"
34
+ raise ArgumentError.new("external library with name '#{instance.name}' already exists")
35
35
  end
36
36
  end
37
37
 
@@ -17,7 +17,7 @@ module Ritsu
17
17
 
18
18
  def initialize(src_path, owner)
19
19
  if !(self.class.is_valid_src_path?(src_path))
20
- raise ArgumentError.new "'#{src_path}' is not a valid source path"
20
+ raise ArgumentError.new("'#{src_path}' is not a valid source path")
21
21
  end
22
22
 
23
23
  @src_path = src_path
@@ -33,7 +33,7 @@ module Ritsu
33
33
 
34
34
  def self.validate_instance(instance)
35
35
  if instances.select { |x| x.src_path == instance.src_path }.length > 0
36
- raise ArgumentError.new "source file with path '#{instance.src_path}' already exists"
36
+ raise ArgumentError.new("source file with path '#{instance.src_path}' already exists")
37
37
  end
38
38
  end
39
39
 
@@ -61,7 +61,17 @@ module Ritsu
61
61
 
62
62
  def update_block(block, options={})
63
63
  block.contents.clear
64
- @project.targets_sorted_by_topological_order.each do |target|
64
+ targets = @project.targets_sorted_by_topological_order
65
+ targets.sort! { |x,y|
66
+ if x.topological_order < y.topological_order
67
+ -1
68
+ elsif x.topological_order > y.topological_order
69
+ 1
70
+ else
71
+ x.name <=> y.name
72
+ end
73
+ }
74
+ targets.each do |target|
65
75
  block.contents << "ADD_SUBDIRECTORY(#{target.name})"
66
76
  end
67
77
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ritsu
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 1
10
- version: 0.5.1
9
+ - 2
10
+ version: 0.5.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - dragonmeteor
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-26 00:00:00 +07:00
18
+ date: 2010-09-11 00:00:00 +07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -174,7 +174,6 @@ files:
174
174
  - test/ritsu/external_library_test.rb
175
175
  - test/ritsu/project_generators/default_generator_test.rb
176
176
  - test/ritsu/project_test.rb
177
- - test/ritsu/src_file_test.rb
178
177
  - test/ritsu/src_files/cpp_file_test.rb
179
178
  - test/ritsu/src_files/executable_cmake_lists_test.rb
180
179
  - test/ritsu/src_files/header_file_test.rb
@@ -182,10 +181,11 @@ files:
182
181
  - test/ritsu/src_files/shared_library_cmake_lists_test.rb
183
182
  - test/ritsu/src_files/static_library_cmake_lists_test.rb
184
183
  - test/ritsu/src_files/target_cmake_lists_test.rb
185
- - test/ritsu/target_test.rb
184
+ - test/ritsu/src_file_test.rb
186
185
  - test/ritsu/targets/executable_test.rb
187
186
  - test/ritsu/targets/shared_library_test.rb
188
187
  - test/ritsu/targets/static_library_test.rb
188
+ - test/ritsu/target_test.rb
189
189
  - test/ritsu/template_policies_test.rb
190
190
  - test/ritsu/utility/accessors_test.rb
191
191
  - test/ritsu/utility/check_upon_add_set_test.rb
@@ -237,7 +237,6 @@ test_files:
237
237
  - test/ritsu/external_library_test.rb
238
238
  - test/ritsu/project_generators/default_generator_test.rb
239
239
  - test/ritsu/project_test.rb
240
- - test/ritsu/src_file_test.rb
241
240
  - test/ritsu/src_files/cpp_file_test.rb
242
241
  - test/ritsu/src_files/executable_cmake_lists_test.rb
243
242
  - test/ritsu/src_files/header_file_test.rb
@@ -245,10 +244,11 @@ test_files:
245
244
  - test/ritsu/src_files/shared_library_cmake_lists_test.rb
246
245
  - test/ritsu/src_files/static_library_cmake_lists_test.rb
247
246
  - test/ritsu/src_files/target_cmake_lists_test.rb
248
- - test/ritsu/target_test.rb
247
+ - test/ritsu/src_file_test.rb
249
248
  - test/ritsu/targets/executable_test.rb
250
249
  - test/ritsu/targets/shared_library_test.rb
251
250
  - test/ritsu/targets/static_library_test.rb
251
+ - test/ritsu/target_test.rb
252
252
  - test/ritsu/template_policies_test.rb
253
253
  - test/ritsu/utility/accessors_test.rb
254
254
  - test/ritsu/utility/check_upon_add_set_test.rb