| 1 |
|
| 2 |
from misc.utility.scons_hints import * |
| 3 |
|
| 4 |
Import("env") |
| 5 |
|
| 6 |
env.tests_sources = [] |
| 7 |
|
| 8 |
env_tests = env.Clone() |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 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]) |