Debian Codegraph @

tests/SCsub

raw symbols SCIP
1 #!/usr/bin/env python
2 from misc.utility.scons_hints import *
3
4 Import("env")
5
6 env.tests_sources = []
7
8 env_tests = env.Clone()
9
10 # We must disable the THREAD_LOCAL entirely in doctest to prevent crashes on debugging
11 # Since we link with /MT thread_local is always expired when the header is used
12 # So the debugger crashes the engine and it causes weird errors
13 # Explained in https://github.com/onqtam/doctest/issues/401
14 if env_tests["platform"] == "windows":
15 env_tests.Append(CPPDEFINES=[("DOCTEST_THREAD_LOCAL", "")])
16
17 if env["disable_exceptions"]:
18 env_tests.Append(CPPDEFINES=["DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS"])
19
20 env_tests.add_source_files(env.tests_sources, "*.cpp")
21
22 lib = env_tests.add_library("tests", env.tests_sources)
23 env.Prepend(LIBS=[lib])