[Scons-users] HOWTO select a toolchain
Stefan Seefeld
stefan at seefeld.name
Mon Jan 4 14:16:46 EST 2016
Hello,
I'm trying to test my build system against a couple of different
compilers installed on my computer. How can I specify (at invocation
time) which compiler to pick ?
My case: I'm in a cygwin shell inside a Windows VM, and I want to build
using the MSVC compiler, not the cygwin GCC.
So I attempt to run `scons CC=cl CXX=cl` but that's ignored (I even
tried `CC=cl CXX=cl scons` to make sure the two variables were read as
environment variables, not scons command-line variables). What is the
correct incantation for this use-case ?
(To make it simpler: even on a normal Linux terminal, `scons
CC=something CXX=something` doesn't seem to have any effect on the
choice of compiler being used.)
And a related question: The SCons man-page
(http://www.scons.org/doc/HTML/scons-man.html) mentions "tool
specifications". Are they available as "current toolchain" properties
inside SConscripts ? I'd like to add my own flags based on which
toolchain is selected, so having access to that classifier would be useful.
Thanks,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the Scons-users
mailing list