diff options
author | Michael Haubenwallner <haubi@gentoo.org> | 2014-05-15 08:17:03 (GMT) |
---|---|---|
committer | Michael Haubenwallner <haubi@gentoo.org> | 2014-05-15 08:17:03 (GMT) |
commit | c82684ba964183647a1965589ef852eacd9e5447 (patch) | |
tree | eeac860a5e8bba755f8f5dc091702bc78989d8a0 /src/engine/SCons/Tool/c++.py | |
parent | 80cdee0bb0319a9c14abd9c60b4123aee07f0274 (diff) | |
download | SCons-c82684ba964183647a1965589ef852eacd9e5447.zip SCons-c82684ba964183647a1965589ef852eacd9e5447.tar.gz SCons-c82684ba964183647a1965589ef852eacd9e5447.tar.bz2 |
Respect preset CC/CXX values detecting cc/c++/gcc/g++ Tools.
As the user-preset values for CC/CXX should rule always, also respect them in
exists() and generate() methods of these Tools. As a result, the value for
CCVERSION/CXXVERSION does match the CC/CXX compiler used (issue#1723).
Diffstat (limited to 'src/engine/SCons/Tool/c++.py')
-rw-r--r-- | src/engine/SCons/Tool/c++.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/engine/SCons/Tool/c++.py b/src/engine/SCons/Tool/c++.py index 82a19c5..430851c 100644 --- a/src/engine/SCons/Tool/c++.py +++ b/src/engine/SCons/Tool/c++.py @@ -72,7 +72,8 @@ def generate(env): SCons.Tool.cc.add_common_cc_variables(env) - env['CXX'] = 'c++' + if 'CXX' not in env: + env['CXX'] = env.Detect(compilers) or compilers[0] env['CXXFLAGS'] = SCons.Util.CLVar('') env['CXXCOM'] = '$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES' env['SHCXX'] = '$CXX' @@ -90,7 +91,7 @@ def generate(env): env['CXXFILESUFFIX'] = '.cc' def exists(env): - return env.Detect(compilers) + return env.Detect(env.get('CXX', compilers)) # Local Variables: # tab-width:4 |