scons_gd/scons/test/ninja/ninja_test_sconscripts/ninja_conftest
2022-10-15 16:06:26 +02:00

22 lines
567 B
Plaintext

SetOption('experimental','ninja')
DefaultEnvironment(tools=[])
import sys
env = Environment()
conf = Configure(env)
env.Tool('ninja')
# create a conf test that will fail. A failing conftest
# should not affect ninja generation and build from taking place.
if sys.platform == "win32":
conf.env.Append(
CCFLAGS="/DEBUG /Z7 /INCREMENTAL:NO",
LINKFLAGS="/DEBUG /INCREMENTAL:NO",
PDB='${TARGET.base}.pdb')
conf.TryRun("int main( int argc, char* argv[] ){return fail;}", '.c')
env = conf.Finish()
env.Program(target='foo', source='foo.c')