Mxx_ru 1.6.12 → 1.6.13

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b22a1fe4d06b2b8a537c03680b8b9021882bf59b
4
- data.tar.gz: 8938721558b2f234f099987b2743ed5139248fd2
3
+ metadata.gz: 8c2b4e6fc5bc2e37bf49d1ddc64e0d3cc9960dd0
4
+ data.tar.gz: 7c966d4f38376eb214b0c2cfc16ae3134a9177a8
5
5
  SHA512:
6
- metadata.gz: d5b331516811a910aaf04ac02cd30b2ae5d88edf87bdafd748d8e82ab704ef4823b7a6e7d6acd76c2f13d4bda3cac69b5e6947ad4e907c4e3a4d65c2929d10f3
7
- data.tar.gz: 09ed8e1dca20eecbf807abd1d59c2e9b8568cbdade6d1c896f6bc1ff6f4598164b77ca79e206c434087c9444dce886883c563ae56991ea7038e6c04f2af10cba
6
+ metadata.gz: 1758dddeefac16dfd3a9d23c3cf42360f19486ae43d5770a6760c00f2d209c89ea5d5132d4c0af12651e043a0f2aa6cc9adc6c4abcc126e177ca3b1540f33489
7
+ data.tar.gz: 9a076f7b445fe98ce2ecfa5cb47a330dfb5fa9e2dc2553e8441bb9d5a2902934e01c827c7b978a1b42d6b3dd016e04e12c2023bd3577f6784c5f0b26b2780d2f
data/Rakefile CHANGED
@@ -33,6 +33,9 @@ gem = Gem::PackageTask.new( spec ) do |pkg|
33
33
  end
34
34
 
35
35
  test = Rake::TestTask.new do |t|
36
+ is_mswin = (/^mswin/ =~ RbConfig::CONFIG[ 'host_os' ] ||
37
+ /^mingw/ =~ RbConfig::CONFIG[ 'host_os' ])
38
+
36
39
  test_files = FileList[ 'tests/**/{tc,ts}*.rb' ]
37
40
 
38
41
  # Visual C++ 8.0-9.0 specific files must be excluded when working with
@@ -46,13 +49,10 @@ test = Rake::TestTask.new do |t|
46
49
  /(mxx_ru\/cpp\/toolsets\/){0,1}vc\d/ =~ ENV[ 'MXX_RU_CPP_TOOLSET' ]
47
50
 
48
51
  # MSWin specific files must be excluded if not Windows platform.
49
- test_files = test_files.delete_if { |n| /mswin/ =~ n } unless
50
- /^mswin/ =~ RbConfig::CONFIG[ 'host_os' ]
52
+ test_files = test_files.delete_if { |n| /mswin/ =~ n } unless is_mswin
51
53
 
52
54
  # Unix specific files must be excluded on Windows platform.
53
- test_files = test_files.delete_if { |n| /unix/ =~ n } if
54
- (/^mswin/ =~ RbConfig::CONFIG[ 'host_os' ] ||
55
- /^mingw/ =~ RbConfig::CONFIG[ 'host_os' ])
55
+ test_files = test_files.delete_if { |n| /unix/ =~ n } if is_mswin
56
56
 
57
57
  # Darwin specific files must be excluded if not MacOS platform.
58
58
  test_files = test_files.delete_if { |n| /darwin/ =~ n } unless
data/bin/mxxruexternals CHANGED
File without changes
data/bin/mxxrugen CHANGED
File without changes
@@ -1,7 +1,7 @@
1
1
  #--
2
2
  # Copyright (c) 1996-2004, Yauheni Akhotnikau
3
3
  # Copyright (c) 2004-2006, JSC Intervale
4
- # Copyright (c) 2006-2015, The Mxx_ru Project
4
+ # Copyright (c) 2006-2016, The Mxx_ru Project
5
5
  # All rights reserved.
6
6
  #
7
7
  # Redistribution and use in source and binary forms, with or without modification,
@@ -36,12 +36,11 @@ module MxxRu
36
36
  # Toolset implemetation for Clang compiler.
37
37
  class ClangFamily < GccFamily
38
38
  public
39
-
40
- def initialize( name )
41
- super( name )
42
- end
39
+ def initialize( name )
40
+ super( name )
41
+ end
43
42
 
44
- # See description at MxxRu::Cpp::Toolset#setup_mandatory_options.
43
+ # See description at MxxRu::Cpp::Toolset#setup_mandatory_options.
45
44
  def setup_mandatory_options( target )
46
45
 
47
46
  if RUNTIME_DEBUG == target.mxx_runtime_mode
@@ -49,7 +48,12 @@ module MxxRu
49
48
  target.linker_option( "-g" )
50
49
  elsif RUNTIME_RELEASE == target.mxx_runtime_mode
51
50
  target.define( "NDEBUG" )
52
- target.linker_option( "-s" )
51
+
52
+ # -s switch is non-supported on clang+msvc.
53
+ if 'mswin' != tag( 'host_os' )
54
+ target.linker_option( "-s" )
55
+ end
56
+
53
57
  if OPTIM_SIZE == target.mxx_optimization
54
58
  target.compiler_option( "-Os" )
55
59
  else
@@ -175,6 +179,185 @@ module MxxRu
175
179
  end
176
180
  end # class ClangFamily
177
181
 
182
+ # Toolset implemetation for Clang compiler for Win32.
183
+ class ClangMswinFamily < ClangFamily
184
+ public
185
+ # See description at MxxRu::Cpp::Toolset#setup_mandatory_options.
186
+ def setup_mandatory_options( target )
187
+
188
+ super( target )
189
+
190
+ # All defines and all include_path should be applied
191
+ # to resource compiler too.
192
+ target.mxx_all_defines.each { |d|
193
+ target.compiler_option( "-D" + d )
194
+ target.mswin_rc_option( "/d" + d )
195
+ }
196
+
197
+ target.mxx_all_include_paths.each { |p|
198
+ target.compiler_option( "-I" + p )
199
+ target.mswin_rc_option( "/i" + p )
200
+ }
201
+
202
+ # Resource compiler specific options.
203
+ target.mxx_all_mswin_rc_defines.each { |d|
204
+ target.mswin_rc_option( "/d" + d )
205
+ }
206
+ target.mxx_all_mswin_rc_include_paths.each { |p|
207
+ target.mswin_rc_option( "/i" + p )
208
+ }
209
+ end
210
+
211
+ # Returns librarian name.
212
+ def librarian_name
213
+ tag( LIBRARIAN_NAME_TAG, "llvm-ar" )
214
+ end
215
+
216
+ # Returns resource compiler name.
217
+ def rc_name
218
+ return tag( RC_NAME_TAG, "rc" )
219
+ end
220
+
221
+ # See description at MxxRu::Cpp::Toolset#exe_file_name.
222
+ def exe_file_name( source_name, target )
223
+ return construct_target_name( source_name, NO_PREFIX, ".exe", target )
224
+ end
225
+
226
+ # See description at MxxRu::Cpp::Toolset#lib_file_name.
227
+ def lib_file_name( source_name, target )
228
+ return construct_target_name( source_name, NO_PREFIX, '.lib', target )
229
+ end
230
+
231
+ # See description at MxxRu::Cpp::Toolset#dll_file_name.
232
+ def dll_file_name( source_name, target )
233
+ return construct_target_name( source_name, NO_PREFIX, '.dll', target )
234
+ end
235
+
236
+ # See description at MxxRu::Cpp::Toolset#make_lib_command_lines.
237
+ def make_lib_command_lines(
238
+ lib_name,
239
+ obj_files,
240
+ librarian_options,
241
+ target )
242
+
243
+ result = "r #{librarian_options.join(' ')} " +
244
+ "#{lib_name} #{obj_files.join(' ')}"
245
+
246
+ return [ "#{librarian_name} #{result}" ]
247
+ end
248
+
249
+ # See description at MxxRu::Cpp::Toolset#clean_dll_specific_files.
250
+ #
251
+ # Delete import library if exists.
252
+ def clean_dll_specific_files(
253
+ a_dll_file,
254
+ a_dll_info,
255
+ a_target )
256
+
257
+ # Delete import library if exists.
258
+ if nil != a_dll_info.link_name
259
+ implib_name = File.join( [ a_dll_info.link_path,
260
+ lib_file_name( a_dll_info.link_name, a_target ) ] )
261
+ MxxRu::Util::delete_file( implib_name )
262
+ end
263
+ end
264
+
265
+ # See description at MxxRu::Cpp::Toolset#implib_link_name.
266
+ def implib_link_name(
267
+ dll_real_name,
268
+ target )
269
+
270
+ # It's required to pass import library name to linker on mswin platform
271
+ if nil != target.mxx_implib_path
272
+ return lib_link_name( target.mxx_target_name, target )
273
+ end
274
+
275
+ return nil
276
+ end
277
+
278
+ # See description at MxxRu::Cpp::Toolset#implib_link_path.
279
+ def implib_link_path(
280
+ dll_real_name,
281
+ dll_real_path,
282
+ target )
283
+ return target.mxx_obj_placement.get_lib(
284
+ target.mxx_implib_path, self, target )
285
+ end
286
+
287
+ # See description at MxxRu::Cpp::Toolset#make_dll_requirements.
288
+ def make_dll_requirements(
289
+ a_dll_name,
290
+ a_dll_info,
291
+ a_linker_lists,
292
+ a_target )
293
+
294
+ result = DllRequirements.new
295
+
296
+ # Dependencies are exists only if import library is present.
297
+ if nil != a_dll_info.link_name
298
+ result.add_libs( [ a_dll_info.link_name ] )
299
+ result.add_lib_paths( [ a_dll_info.link_path ] )
300
+ end
301
+
302
+ return result
303
+ end
304
+
305
+ # Return string containing port-specific linker option for DLL linking.
306
+ #
307
+ # All parameters are similar to make_dll_command_lines parameters.
308
+ #
309
+ # Return empty string in a base class.
310
+ def port_specific_dll_link_options(
311
+ a_dll_name, a_dll_info, a_linker_lists, a_target )
312
+ # Build import library if it's required.
313
+ if nil != a_dll_info.link_name
314
+ full_lib_name = File.join( [ a_dll_info.link_path,
315
+ lib_file_name( a_dll_info.link_name, a_target ) ] )
316
+
317
+ return "-Wl,/IMPLIB:#{full_lib_name}"
318
+ end
319
+
320
+ return ""
321
+ end
322
+
323
+ # Checks library name for suffix '.lib' and return name without
324
+ # that suffix.
325
+ def port_specific_lib_name_checker(library_name)
326
+ if /\.lib$/i =~ library_name
327
+ MxxRu::Util::remove_file_ext(library_name)
328
+ else
329
+ library_name
330
+ end
331
+ end
332
+
333
+ # Return command line switch for forcing specified library type.
334
+ def lib_linking_mode_switch( linking_mode )
335
+ ""
336
+ end
337
+
338
+ def enclose_linker_include_lib_options_into_brackes( options )
339
+ " #{options} "
340
+ end
341
+
342
+ # See description at MxxRu::Cpp::Toolset#mswin_res_file_name.
343
+ def mswin_res_file_name( source_name )
344
+ return source_name + ".res"
345
+ end
346
+
347
+ # See description at MxxRu::Cpp::Toolset#make_mswin_res_command_lines.
348
+ def make_mswin_res_command_lines(
349
+ res_name,
350
+ rc_file,
351
+ rc_options,
352
+ target )
353
+
354
+ return [ "#{rc_name} " +
355
+ "#{rc_options.join(' ')} /r " +
356
+ "/fo#{res_name} #{rc_file}" ]
357
+ end
358
+
359
+ end # class ClangMswinFamily
360
+
178
361
  end # module Toolsets
179
362
 
180
363
  end # module Cpp
@@ -1,7 +1,7 @@
1
1
  #--
2
2
  # Copyright (c) 1996-2004, Yauheni Akhotnikau
3
3
  # Copyright (c) 2004-2006, JSC Intervale
4
- # Copyright (c) 2006-2015, The Mxx_ru Project
4
+ # Copyright (c) 2006-2016, The Mxx_ru Project
5
5
  # All rights reserved.
6
6
  #
7
7
  # Redistribution and use in source and binary forms, with or without modification,
@@ -0,0 +1,54 @@
1
+ #--
2
+ # Copyright (c) 1996-2004, Yauheni Akhotnikau
3
+ # Copyright (c) 2004-2006, JSC Intervale
4
+ # Copyright (c) 2006-2016, The Mxx_ru Project
5
+ # All rights reserved.
6
+ #
7
+ # Redistribution and use in source and binary forms, with or without modification,
8
+ # are permitted provided that the following conditions are met:
9
+ #
10
+ # 1. Redistributions of source code must retain the above copyright notice,
11
+ # this list of conditions and the following disclaimer.
12
+ # 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ # this list of conditions and the following disclaimer in the documentation
14
+ # and/or other materials provided with the distribution.
15
+ # 3. The name of the author may not be used to endorse or promote products derived
16
+ # from this software without specific prior written permission.
17
+ #
18
+ # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
19
+ # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
20
+ # AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
21
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
+ # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23
+ # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
+ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26
+ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ #++
28
+
29
+ require 'mxx_ru/cpp/toolsets/clang_family'
30
+
31
+ module MxxRu
32
+ module Cpp
33
+ module Toolsets
34
+
35
+ # Toolset implemetation for Clang compiler.
36
+ class ClangMsVC < ClangMswinFamily
37
+ public
38
+
39
+ def initialize( a_name = "clang" )
40
+ super( a_name )
41
+ setup_tag( "host_os", "mswin" )
42
+ setup_tag( "target_os", "mswin" )
43
+ end
44
+
45
+ end # class ClangFamily
46
+
47
+ end # module Toolsets
48
+
49
+ end # module Cpp
50
+
51
+ end # module MxxRu
52
+
53
+ MxxRu::Cpp::setup_toolset( MxxRu::Cpp::Toolsets::ClangMsVC.new )
54
+
@@ -34,4 +34,4 @@
34
34
  #
35
35
  # puts 'Mxx_ru version is: ' + MXX_RU_VERSION
36
36
  #
37
- MXX_RU_VERSION = '1.6.12'
37
+ MXX_RU_VERSION = '1.6.13'
@@ -1,4 +1,4 @@
1
- #if !defined( IMPL__CONN_PARAMS_HPP )
1
+ #if !defined( IMPL_CONN_PARAMS_HPP )
2
2
  #define IMPL_CONN_PARAMS_HPP
3
3
 
4
4
  namespace impl
@@ -1,4 +1,4 @@
1
- #if !defined( IMPL__CONN_PARAMS_HPP )
1
+ #if !defined( IMPL_CONN_PARAMS_HPP )
2
2
  #define IMPL_CONN_PARAMS_HPP
3
3
 
4
4
  namespace impl
@@ -0,0 +1,20 @@
1
+ require 'mxx_ru/cpp'
2
+ require 'mxx_ru/cpp/toolsets/vc8'
3
+
4
+ module MxxRu
5
+ module Cpp
6
+ module Toolsets
7
+
8
+ # Extension of Vc8Family class for possibility of
9
+ # default manifest restoring.
10
+ #
11
+ class Vc8Family
12
+ def self.restore_default_manifest(manifest)
13
+ @@default_manifest = manifest
14
+ end
15
+ end # class Vc8Family
16
+
17
+ end # module Toolsets
18
+ end # module Cpp
19
+ end # module MxxRu
20
+
@@ -1,24 +1,6 @@
1
1
  require 'test/unit'
2
2
 
3
- require 'mxx_ru/cpp'
4
- require 'mxx_ru/cpp/toolsets/vc8'
5
-
6
- module MxxRu
7
- module Cpp
8
- module Toolsets
9
-
10
- # Extension of Vc8Family class for possibility of
11
- # default manifest restoring.
12
- #
13
- class Vc8Family
14
- def self.restore_default_manifest(manifest)
15
- @@default_manifest = manifest
16
- end
17
- end # class Vc8Family
18
-
19
- end # module Toolsets
20
- end # module Cpp
21
- end # module MxxRu
3
+ require_relative 'restore_default_manifest'
22
4
 
23
5
  class TC_ActualManifest < Test::Unit::TestCase
24
6
  def initialize( test_method_name )
@@ -1,16 +1,22 @@
1
1
  require 'test/unit'
2
2
 
3
- require 'mxx_ru/cpp'
4
- require 'mxx_ru/cpp/toolsets/vc8'
3
+ require_relative 'restore_default_manifest'
5
4
 
6
5
  class TC_DefineManifest < Test::Unit::TestCase
7
6
  def initialize( test_method_name )
8
7
  super test_method_name
8
+ end
9
9
 
10
+ def setup
11
+ @old_manifest = Mxx_ru::Cpp::Toolsets::Vc8::default_manifest
10
12
  # Default manifest should not be used.
11
13
  Mxx_ru::Cpp::Toolsets::Vc8::manifest nil
12
14
  end
13
15
 
16
+ def teardown
17
+ Mxx_ru::Cpp::Toolsets::Vc8::restore_default_manifest @old_manifest
18
+ end
19
+
14
20
  def test_target_autogen
15
21
  target = Mxx_ru::Cpp::Exe_target.new( 'target_autogen.rb' )
16
22
 
@@ -1,9 +1,18 @@
1
1
  require 'test/unit'
2
2
 
3
- require 'mxx_ru/cpp'
4
- require 'mxx_ru/cpp/toolsets/vc8'
3
+ require_relative 'restore_default_manifest'
5
4
 
6
5
  class TC_DropDefaultManifest < Test::Unit::TestCase
6
+ def setup
7
+ @old_manifest = Mxx_ru::Cpp::Toolsets::Vc8::default_manifest
8
+ # Default manifest should not be used.
9
+ Mxx_ru::Cpp::Toolsets::Vc8::manifest nil
10
+ end
11
+
12
+ def teardown
13
+ Mxx_ru::Cpp::Toolsets::Vc8::restore_default_manifest @old_manifest
14
+ end
15
+
7
16
  def test_drop_default_manifest
8
17
  Mxx_ru::Cpp::Toolsets::Vc8::manifest( nil )
9
18
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Mxx_ru
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.12
4
+ version: 1.6.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Mxx_ru Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-04 00:00:00.000000000 Z
11
+ date: 2016-09-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Mxx_ru is a cross-platform build tool primarily focused to C/C++ projects
14
14
  email: eao197@yahoo.com
@@ -103,6 +103,7 @@ files:
103
103
  - lib/mxx_ru/cpp/toolsets/clang_family.rb
104
104
  - lib/mxx_ru/cpp/toolsets/clang_freebsd.rb
105
105
  - lib/mxx_ru/cpp/toolsets/clang_linux.rb
106
+ - lib/mxx_ru/cpp/toolsets/clang_msvc.rb
106
107
  - lib/mxx_ru/cpp/toolsets/gcc_cygwin.rb
107
108
  - lib/mxx_ru/cpp/toolsets/gcc_darwin.rb
108
109
  - lib/mxx_ru/cpp/toolsets/gcc_family.rb
@@ -168,7 +169,6 @@ files:
168
169
  - tests/cpp/custom_target_prefix/dll.cpp
169
170
  - tests/cpp/custom_target_prefix/dll.rb
170
171
  - tests/cpp/custom_target_prefix/tc_custom_target_prefix.rb
171
- - tests/cpp/lib_from_lib_dependecies/a.cpp
172
172
  - tests/cpp/lib_from_lib_dependecies/a.rb
173
173
  - tests/cpp/lib_from_lib_dependecies/b.cpp
174
174
  - tests/cpp/lib_from_lib_dependecies/b.rb
@@ -313,6 +313,7 @@ files:
313
313
  - tests/mxx_ru/target_ext/tc_target_ext.rb
314
314
  - tests/mxx_ru/tc_makestyle_generator.rb
315
315
  - tests/mxx_ru/toolset/tc_tag_search.rb
316
+ - tests/mxx_ru/vc8/restore_default_manifest.rb
316
317
  - tests/mxx_ru/vc8/tc_actual_manifest.rb
317
318
  - tests/mxx_ru/vc8/tc_append_mt_commands.rb
318
319
  - tests/mxx_ru/vc8/tc_default_manifest.rb
@@ -337,33 +338,22 @@ files:
337
338
  - tests/unix/lib_linking_mode/a_static.rb
338
339
  - tests/unix/lib_linking_mode/etalon/shared.txt
339
340
  - tests/unix/lib_linking_mode/etalon/static.txt
340
- - tests/unix/lib_linking_mode/liba.a
341
- - tests/unix/lib_linking_mode/liba.so
342
341
  - tests/unix/lib_linking_mode/main.impl.cpp
343
342
  - tests/unix/lib_linking_mode/main_conflict.cpp
344
343
  - tests/unix/lib_linking_mode/main_conflict.rb
345
344
  - tests/unix/lib_linking_mode/main_conflict_2.rb
346
- - tests/unix/lib_linking_mode/main_shared
347
345
  - tests/unix/lib_linking_mode/main_shared.cpp
348
346
  - tests/unix/lib_linking_mode/main_shared.rb
349
347
  - tests/unix/lib_linking_mode/main_shared.ut.rb
350
348
  - tests/unix/lib_linking_mode/main_shared_2.cpp
351
349
  - tests/unix/lib_linking_mode/main_shared_2.rb
352
350
  - tests/unix/lib_linking_mode/main_shared_2.ut.rb
353
- - tests/unix/lib_linking_mode/main_static
354
351
  - tests/unix/lib_linking_mode/main_static.cpp
355
352
  - tests/unix/lib_linking_mode/main_static.rb
356
353
  - tests/unix/lib_linking_mode/main_static.ut.rb
357
354
  - tests/unix/lib_linking_mode/main_static_2.cpp
358
355
  - tests/unix/lib_linking_mode/main_static_2.rb
359
356
  - tests/unix/lib_linking_mode/main_static_2.ut.rb
360
- - tests/unix/lib_linking_mode/o/a_shared.o
361
- - tests/unix/lib_linking_mode/o/a_static.o
362
- - tests/unix/lib_linking_mode/o/main_conflict.o
363
- - tests/unix/lib_linking_mode/o/main_shared.o
364
- - tests/unix/lib_linking_mode/o/main_static.o
365
- - tests/unix/lib_linking_mode/out/shared.txt
366
- - tests/unix/lib_linking_mode/out/static.txt
367
357
  - tests/unix/lib_linking_mode/tc_conflicted_build.rb
368
358
  - tests/unix/lib_linking_mode/tc_normal_build.rb
369
359
  - tests/unix/lib_order/a.cpp
@@ -1,3 +0,0 @@
1
- #include <cstdio>
2
-
3
- void A() { std::printf( "A2\n" ); }
Binary file
Binary file
File without changes
@@ -1,2 +0,0 @@
1
- A::A [static]
2
- A::~A [static]