diff options
Diffstat (limited to 'backend')
-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; } |