diff options
Diffstat (limited to 'QA/Checker/SConscript')
-rw-r--r-- | QA/Checker/SConscript | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/QA/Checker/SConscript b/QA/Checker/SConscript index 13dec62..f8a3ce4 100644 --- a/QA/Checker/SConscript +++ b/QA/Checker/SConscript @@ -1,17 +1,23 @@ +import os + Import("env") if env["TEST"] : - if env["SCONS_STAGE"] == "flags" : - env["CHECKER_FLAGS"] = { - "CPPPATH" : ["#/3rdParty/HippoMocks"], - "LIBS": ["Checker"], - "LIBPATH": [Dir(".")], - "LINKFLAGS": env["PLATFORM"] == "win32" and ["/SUBSYSTEM:CONSOLE"] or [] - } + if env["SCONS_STAGE"] == "flags" : + env["CHECKER_FLAGS"] = { + "LIBS": ["Checker"], + "LIBPATH": [Dir(".")], + "LINKFLAGS": env["PLATFORM"] == "win32" and ["/SUBSYSTEM:CONSOLE"] or [] + } + + if os.path.basename(env["CC"]) in ("clang", "gcc"): + env["CHECKER_FLAGS"]["CPPFLAGS"] = ["-isystem" + Dir("#/3rdParty/HippoMocks").abspath] + else : + env["CHECKER_FLAGS"]["CPPPATH"] = ["#/3rdParty/HippoMocks"] - if env["SCONS_STAGE"] == "build" : - checker_env = env.Clone() - checker_env.UseFlags(env["SWIFTEN_FLAGS"]) - checker_env.UseFlags(env["BOOST_FLAGS"]) - checker_env.UseFlags(env["CPPUNIT_FLAGS"]) - checker_env.Library("Checker", ["checker.cpp", "IO.cpp"]) + if env["SCONS_STAGE"] == "build" : + checker_env = env.Clone() + checker_env.UseFlags(env["SWIFTEN_FLAGS"]) + checker_env.UseFlags(env["BOOST_FLAGS"]) + checker_env.UseFlags(env["CPPUNIT_FLAGS"]) + checker_env.Library("Checker", ["checker.cpp", "IO.cpp"]) |