summaryrefslogtreecommitdiffstats
blob: 70458f04c90b566288a6b1f7a056075acc2bba28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os

Import("env")

if env["TEST"] :
    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"]).startswith(("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.UseFlags(env["GOOGLETEST_FLAGS"])
            checker_env.Library("Checker", ["checker.cpp", "IO.cpp", "CppUnitTestResultPrinter.cpp"])