Mxx_ru 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README +8 -8
- data/Rakefile +2 -2
- data/lib/mxx_ru/abstract_target.rb +1 -1
- data/lib/mxx_ru/binary_library.rb +1 -1
- data/lib/mxx_ru/binary_target.rb +1 -1
- data/lib/mxx_ru/binary_unittest.rb +36 -2
- data/lib/mxx_ru/cmd_line_option_processor.rb +1 -1
- data/lib/mxx_ru/compat.rb +1 -1
- data/lib/mxx_ru/cpp.rb +1 -1
- data/lib/mxx_ru/cpp/analyzer.rb +1 -1
- data/lib/mxx_ru/cpp/composite.rb +1 -1
- data/lib/mxx_ru/cpp/detect_toolset.rb +2 -2
- data/lib/mxx_ru/cpp/lib_collection.rb +1 -1
- data/lib/mxx_ru/cpp/mode.rb +1 -1
- data/lib/mxx_ru/cpp/obj_placement.rb +1 -1
- data/lib/mxx_ru/cpp/obj_placements/custom_subdir.rb +1 -1
- data/lib/mxx_ru/cpp/qt.rb +1 -1
- data/lib/mxx_ru/cpp/qt4.rb +1 -1
- data/lib/mxx_ru/cpp/qt4_via_pkg_config.rb +1 -1
- data/lib/mxx_ru/cpp/qt4details.rb +1 -1
- data/lib/mxx_ru/cpp/rucodegen.rb +1 -1
- data/lib/mxx_ru/cpp/source_file.rb +1 -1
- data/lib/mxx_ru/cpp/target.rb +1 -1
- data/lib/mxx_ru/cpp/toolset.rb +70 -7
- data/lib/mxx_ru/cpp/toolsets/bcc_win32_5.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/bcc_win32_family.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/c89_etk_nsk.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/c89_nsk.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/c89_nsk_family.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/clang_family.rb +10 -4
- data/lib/mxx_ru/cpp/toolsets/clang_linux.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/gcc_cygwin.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/gcc_darwin.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/gcc_family.rb +10 -15
- data/lib/mxx_ru/cpp/toolsets/gcc_linux.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/gcc_mingw.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/gcc_sparc_solaris.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/gcc_unix_family.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/icc_win.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/vc10.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/vc11.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/vc12.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/vc7.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/vc8.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/vc8_family.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/vc9.rb +1 -1
- data/lib/mxx_ru/cpp/toolsets/vc_family.rb +1 -1
- data/lib/mxx_ru/environment_setup.rb +1 -1
- data/lib/mxx_ru/ex.rb +1 -1
- data/lib/mxx_ru/generators/bin-unittest/g.rb +1 -1
- data/lib/mxx_ru/generators/cpp-build-root/g.rb +1 -1
- data/lib/mxx_ru/generators/cpp-composite/g.rb +1 -1
- data/lib/mxx_ru/generators/cpp-dll/g.rb +1 -1
- data/lib/mxx_ru/generators/cpp-exe/g.rb +1 -1
- data/lib/mxx_ru/generators/cpp-lib-collection/g.rb +1 -1
- data/lib/mxx_ru/generators/cpp-lib/g.rb +1 -1
- data/lib/mxx_ru/generators/impl/cpp/generation.rb +1 -1
- data/lib/mxx_ru/generators/impl/std_receiver.rb +1 -1
- data/lib/mxx_ru/makestyle_generator.rb +1 -1
- data/lib/mxx_ru/textfile_unittest.rb +1 -1
- data/lib/mxx_ru/util.rb +1 -1
- data/lib/mxx_ru/version.rb +2 -2
- data/tests/mxx_ru/generators/cpp/tc_generator.rb +1 -1
- data/tests/mxx_ru/generators/cpp/tc_template_params.rb +1 -1
- data/tests/unix/lib_linking_mode/tc_normal_build.rb +1 -1
- data/tests/unix/lib_order/a.cpp +3 -3
- data/tests/unix/lib_order/tc_normal_build.rb +1 -1
- metadata +119 -123
- data/tests/cpp/lib_from_lib_dependecies/a.cpp +0 -3
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1a361e5180a07f48e75be075751bef903b4eebff
|
4
|
+
data.tar.gz: 3704cc04fc0760e44e8b4ca1d13218e8c755bd3c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 47583eb96ba4fa74d30f730fdfa8a18a45c55bf36160a42db293d0be7d9bd1e18e09c9341d82e788333955ea7d247903cbc19627bfa32318712ec22154e7b3b5
|
7
|
+
data.tar.gz: e5b8567e860d13c4b57ddb6b040592db2c121a90e298f0be5c47eaf53e2132d8e5b884720a6ac2a1f70b0355e25a1cc9db5930ca692d0ab92fff78999332c582
|
data/README
CHANGED
@@ -2,20 +2,20 @@ Copyright (c) 1996-2005, Yauheni Akhotnikau
|
|
2
2
|
|
3
3
|
Copyright (c) 2004-2006, JSC Intervale
|
4
4
|
|
5
|
-
Copyright (c) 2006-
|
5
|
+
Copyright (c) 2006-2014 The Mxx_ru Project
|
6
6
|
|
7
7
|
All rights reserved.
|
8
8
|
|
9
|
-
Mxx_ru (Make++ on Ruby) is a cross-platform build tool.
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
Mxx_ru (Make++ on Ruby) is a cross-platform build tool. It's intended for
|
10
|
+
C/C++ languages in general, but it's easy to extend for handling other
|
11
|
+
languages. It allows to use one project file to compile the project on
|
12
|
+
platforms like Windows, Unix (Linux, *BSD), HP NonStop, etc, using a compilers
|
13
|
+
such as Visual C++, GNU C++, Clang, Borland C++, c89, etc.
|
14
14
|
|
15
15
|
Originally mxx_ru was developed by Intervale company (http://intervale.ru).
|
16
16
|
Later, Intervale company released Mxx_ru as an Open Source project
|
17
17
|
and now Mxx_ru is developed by a group of developers, interested in Mxx_ru
|
18
18
|
evolution.
|
19
19
|
|
20
|
-
Latest versions of mxx_ru and it's documentation (including installation and
|
21
|
-
instruction) is available at http://
|
20
|
+
Latest versions of mxx_ru and it's documentation (including installation and
|
21
|
+
setup instruction) is available at http://sourceforge.net/projects/mxxru/.
|
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ spec = Gem::Specification.new do |s|
|
|
12
12
|
s.version = MXX_RU_VERSION
|
13
13
|
s.author = "The Mxx_ru Project"
|
14
14
|
s.email = "eao197@yahoo.com"
|
15
|
-
s.homepage = "http://
|
15
|
+
s.homepage = "http://sourceforge.net/projects/mxxru"
|
16
16
|
s.platform = Gem::Platform::RUBY
|
17
17
|
s.summary = "Mxx_ru (Make++ on Ruby) is a cross-platform build tool"
|
18
18
|
s.files = FileList[ "{bin,tests,lib,docs,examples}/**/*" ].
|
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
|
|
20
20
|
s.executables = 'mxxrugen'
|
21
21
|
s.require_path = "lib"
|
22
22
|
s.has_rdoc = true
|
23
|
-
s.rdoc_options = [ '
|
23
|
+
s.rdoc_options = [ '--main', 'README' ]
|
24
24
|
s.extra_rdoc_files = [ "README", "Rakefile", "COPYING", "NEWS" ] + FileList[ "docs/**/*" ].to_a
|
25
25
|
end
|
26
26
|
|
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
data/lib/mxx_ru/binary_target.rb
CHANGED
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
@@ -91,6 +91,12 @@ class BinaryUnittestTarget < AbstractTarget
|
|
91
91
|
@mxx_build_state = nil
|
92
92
|
|
93
93
|
@mxx_target_project = required_prj( a_target_project )
|
94
|
+
|
95
|
+
# By default the expected result of binary command is zero.
|
96
|
+
# Kernel#system will return 'true' in that case.
|
97
|
+
# In the case of NegativeBinaryUnittestTarget this value
|
98
|
+
# must be changed to 'false'
|
99
|
+
@expected_system_retval = true
|
94
100
|
end
|
95
101
|
|
96
102
|
# Build subordinated project and run it.
|
@@ -110,7 +116,7 @@ class BinaryUnittestTarget < AbstractTarget
|
|
110
116
|
# In dry-run do not actually execute anything.
|
111
117
|
if !MxxRu::Util::Mode.instance.is_dry_run
|
112
118
|
puts "running unit test: #{full_names[0]}..."
|
113
|
-
if
|
119
|
+
if @expected_system_retval != system( full_names[ 0 ] )
|
114
120
|
puts "\n\nunit test '#{full_names[0]}' FAILED! #{$?}"
|
115
121
|
raise BuildEx.new( full_names[ 0 ], $? )
|
116
122
|
end
|
@@ -140,4 +146,32 @@ end
|
|
140
146
|
# For compatibility with previous versions.
|
141
147
|
Binary_unittest_target = BinaryUnittestTarget
|
142
148
|
|
149
|
+
# Class describing a target, which is unit-test binary application
|
150
|
+
# with non-zero exit code.
|
151
|
+
#
|
152
|
+
# This class is similar to BinaryUnittestTarget but intended for the
|
153
|
+
# cases where binary unit test expected to fail (sometimes failure is
|
154
|
+
# a expected result).
|
155
|
+
#
|
156
|
+
# File to run unit-test.
|
157
|
+
# MxxRu::setup_target(
|
158
|
+
# MxxRu::NegativeBinaryUnittestTarget.new(
|
159
|
+
# "test/pack/ut.rb",
|
160
|
+
# "test/pack/prj.rb ) )
|
161
|
+
#
|
162
|
+
#
|
163
|
+
class NegativeBinaryUnittestTarget < BinaryUnittestTarget
|
164
|
+
|
165
|
+
# Constructor.
|
166
|
+
#
|
167
|
+
# [_a_alias_] Self alias.
|
168
|
+
# [_a_target_project_] Project, responsible for build of unit-test
|
169
|
+
# application.
|
170
|
+
def initialize( a_alias, a_target_project )
|
171
|
+
super( a_alias, a_target_project )
|
172
|
+
|
173
|
+
@expected_system_retval = false
|
174
|
+
end
|
143
175
|
end
|
176
|
+
|
177
|
+
end # module MxxRu
|
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
data/lib/mxx_ru/compat.rb
CHANGED
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
data/lib/mxx_ru/cpp.rb
CHANGED
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
data/lib/mxx_ru/cpp/analyzer.rb
CHANGED
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
data/lib/mxx_ru/cpp/composite.rb
CHANGED
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
@@ -144,7 +144,7 @@ module MxxRu
|
|
144
144
|
#
|
145
145
|
# Returns name of toolset of throw exception if toolset is not detectable.
|
146
146
|
def Cpp.try_detect_toolset_myself
|
147
|
-
if
|
147
|
+
if RbConfig::CONFIG['host_os'] =~ /linux/
|
148
148
|
# Assume that GCC is default compiler on Linux.
|
149
149
|
"gcc_linux"
|
150
150
|
else
|
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
data/lib/mxx_ru/cpp/mode.rb
CHANGED
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
data/lib/mxx_ru/cpp/qt.rb
CHANGED
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
data/lib/mxx_ru/cpp/qt4.rb
CHANGED
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
data/lib/mxx_ru/cpp/rucodegen.rb
CHANGED
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
data/lib/mxx_ru/cpp/target.rb
CHANGED
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
data/lib/mxx_ru/cpp/toolset.rb
CHANGED
@@ -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-
|
4
|
+
# Copyright (c) 2006-2014, 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,
|
@@ -68,7 +68,7 @@ module MxxRu
|
|
68
68
|
# For compatibility with previous versions.
|
69
69
|
Target_with_full_path = TargetWithFullPath
|
70
70
|
|
71
|
-
# Class, describing mswin-res
|
71
|
+
# Class, describing mswin-res-info.
|
72
72
|
class MswinResInfo < TargetWithFullPath
|
73
73
|
attr_reader :file_name
|
74
74
|
attr_reader :path
|
@@ -249,6 +249,29 @@ module MxxRu
|
|
249
249
|
# For compatibility with previous versions.
|
250
250
|
Dll_requirements = DllRequirements
|
251
251
|
|
252
|
+
# C++ standard versions.
|
253
|
+
|
254
|
+
# Default C++ standard variant.
|
255
|
+
# The compiler defaults must be used.
|
256
|
+
#
|
257
|
+
# Since v.1.6.3
|
258
|
+
CPP_STD_DEFAULT = 0
|
259
|
+
|
260
|
+
# C++03 standard.
|
261
|
+
#
|
262
|
+
# Since v.1.6.3
|
263
|
+
CPP_STD03 = 1
|
264
|
+
|
265
|
+
# C++11 standard.
|
266
|
+
#
|
267
|
+
# Since v.1.6.3
|
268
|
+
CPP_STD11 = 2
|
269
|
+
|
270
|
+
# C++14 standard.
|
271
|
+
#
|
272
|
+
# Since v.1.6.3
|
273
|
+
CPP_STD14 = 3
|
274
|
+
|
252
275
|
# Base toolset class.
|
253
276
|
# Toolset is a compiler and tool set for compiling an application.
|
254
277
|
class Toolset
|
@@ -328,6 +351,9 @@ module MxxRu
|
|
328
351
|
def initialize( a_name )
|
329
352
|
@name = a_name
|
330
353
|
@tags = Hash.new
|
354
|
+
|
355
|
+
# C++ standard version
|
356
|
+
@cpp_std = CPP_STD_DEFAULT
|
331
357
|
end
|
332
358
|
|
333
359
|
# Has a target any linkable libraries as dependecies?
|
@@ -976,6 +1002,38 @@ module MxxRu
|
|
976
1002
|
make_lib_name( target.mxx_target_name, target ).full_name
|
977
1003
|
end
|
978
1004
|
|
1005
|
+
# Sets a flag includes "-std=c++0x" compiler option.
|
1006
|
+
# Using at gnu-compilers.
|
1007
|
+
#
|
1008
|
+
# Kept for compatibility with previous versions.
|
1009
|
+
def force_cpp0x_std
|
1010
|
+
set_cpp_std CPP_STD11
|
1011
|
+
end
|
1012
|
+
|
1013
|
+
# Set C++03 standard version.
|
1014
|
+
#
|
1015
|
+
# Since v.1.6.3.
|
1016
|
+
def force_cpp03
|
1017
|
+
set_cpp_std CPP_STD03
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
# Set C++11 standard version.
|
1021
|
+
#
|
1022
|
+
# Since v.1.6.3
|
1023
|
+
def force_cpp11
|
1024
|
+
set_cpp_std CPP_STD11
|
1025
|
+
end
|
1026
|
+
|
1027
|
+
# Set C++14 standard version.
|
1028
|
+
#
|
1029
|
+
# Since v.1.6.3
|
1030
|
+
def force_cpp14
|
1031
|
+
set_cpp_std CPP_STD14
|
1032
|
+
end
|
1033
|
+
|
1034
|
+
# Get the C++ standard version
|
1035
|
+
attr_reader :cpp_std
|
1036
|
+
|
979
1037
|
protected
|
980
1038
|
# Creating object file names.
|
981
1039
|
# Returns array of ObjInfo objects.
|
@@ -1212,11 +1270,16 @@ module MxxRu
|
|
1212
1270
|
p + source_name + s
|
1213
1271
|
end
|
1214
1272
|
|
1215
|
-
|
1216
|
-
|
1217
|
-
# Sets
|
1218
|
-
#
|
1219
|
-
|
1273
|
+
# Set C++ standard version.
|
1274
|
+
#
|
1275
|
+
# Sets new value only if it is greater than old value.
|
1276
|
+
# It means that call to force_cpp03 after the previous
|
1277
|
+
# call to force_cpp11 will not change C++ standard version
|
1278
|
+
# from CPP_STD11 to CPP_STD03.
|
1279
|
+
#
|
1280
|
+
# Since v.1.6.3.
|
1281
|
+
def set_cpp_std( version )
|
1282
|
+
@cpp_std = version if @cpp_std < version
|
1220
1283
|
end
|
1221
1284
|
|
1222
1285
|
end # class Toolset
|