scons
scons copied to clipboard
env.Clone() - CXXFLAGS etc. not copied when "tools" parameter passed
This issue was originally created at: 2012-11-23 12:56:47.
This issue was reported by: ang3lus.
ang3lus said at 2012-11-23 12:56:47
env = Environment(
CXX=cxx,
CXXFLAGS = cxx_flags,
LINKFLAGS = link_flags,
CPPPATH=include_dirs,
LIBPATH=lib_paths,
)
print env['CXXFLAGS']
...
test_env = env.Clone(tools=['default', 'cxxtest'])
print test_env['CXXFLAGS']
Output:
scons: Reading SConscript files ...
**** Compiling in release mode...
-std=c++11 -stdlib=libc++ -O2 `pkg-config --cflags-only-I freetype2`
Loading CxxTest tool...
<------ here is the print test_env['CXXFLAGS']
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
The problem: When the "tools" parameter is passed to the "Clone" method not all variables are copied.
Environment: python 3.3
Presuming the story is if a tools arg is specified, a poorly behaved mytool.generate() will re-initialize certain variables, not keeping existing values.