diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-01-01 10:29:01 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-01-01 10:29:07 +0100 |
commit | e8afe1630280335e5c7f4938f7c265b8798049d1 (patch) | |
tree | f1b319bf0a151fdcea9398e253a7fc0f1d492e0b /backend/ninja | |
parent | 5e9b850672cccb8ecf20196c313727932c977856 (diff) |
Use correct directory for tests depending on optimization level
Diffstat (limited to 'backend/ninja')
-rw-r--r-- | backend/ninja/Ninja.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index 63624a9..4eecd6d 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -854,12 +854,21 @@ namespace backend if(!ninja.getSourceFiles().empty()) { - FileString debugBuildPath = testSourceDirNative + TINYDIR_STRING("/sibs-build/debug"); - Result<bool> buildFileResult = ninja.build(sibsTestConfig, debugBuildPath.c_str()); + FileString buildPath = testSourceDirNative; + switch(sibsTestConfig.getOptimizationLevel()) + { + case OPT_LEV_DEBUG: + buildPath += TINYDIR_STRING("/sibs-build/debug"); + break; + case OPT_LEV_RELEASE: + buildPath += TINYDIR_STRING("/sibs-build/release"); + break; + } + Result<bool> buildFileResult = ninja.build(sibsTestConfig, buildPath.c_str()); if (!buildFileResult) return buildFileResult; - Result<bool> buildResult = ninja.compile(debugBuildPath.c_str()); + Result<bool> buildResult = ninja.compile(buildPath.c_str()); if (!buildResult) return buildResult; } |