summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/GoogleTest/SConscript')
-rw-r--r--3rdParty/GoogleTest/SConscript36
1 files changed, 36 insertions, 0 deletions
diff --git a/3rdParty/GoogleTest/SConscript b/3rdParty/GoogleTest/SConscript
new file mode 100644
index 0000000..f7a8be2
--- /dev/null
+++ b/3rdParty/GoogleTest/SConscript
@@ -0,0 +1,36 @@
+Import("env")
+
+if env["TEST"] :
+ includeFlagPrefix = ""
+ if env["PLATFORM"] == "win32" :
+ includeFlagPrefix = "/I"
+ elif env["PLATFORM"] == "sunos" :
+ includeFlagPrefix = "-I"
+ else :
+ includeFlagPrefix = "-isystem"
+ cppflags = [(includeFlagPrefix + Dir("src/googletest/include").abspath), (includeFlagPrefix + Dir("src/googlemock/include").abspath)]
+
+################################################################################
+# Module flags
+################################################################################
+
+ if env["SCONS_STAGE"] == "flags" :
+ env["GOOGLETEST_FLAGS"] = {
+ "CPPPATH": [env.Dir(".")],
+ "CPPFLAGS": cppflags,
+ "LIBPATH": [env.Dir(".")],
+ "LIBS": ["Swiften_GoogleTest"]
+ }
+
+################################################################################
+# Build
+################################################################################
+
+ if env["SCONS_STAGE"] == "build" :
+ myenv = env.Clone()
+ myenv.Replace(CXXFLAGS = [flag for flag in env["CXXFLAGS"] if not flag.startswith("-W")])
+ myenv.Append(CPPPATH = ["src/googletest/include", "src/googletest"])
+ sources = [
+ "src/googletest/src/gtest-all.cc"
+ ]
+ myenv.StaticLibrary("Swiften_GoogleTest", sources)