aboutsummaryrefslogtreecommitdiff
path: root/backend/ninja/Ninja.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/ninja/Ninja.cpp')
-rw-r--r--backend/ninja/Ninja.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 2402ec1..6e9079a 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -196,7 +196,7 @@ namespace backend
return Result<bool>::Ok(true);
}
- Result<bool> Ninja::createBuildFile(const SibsConfig &config, const char *savePath, LinkerFlagCallbackFunc staticLinkerFlagCallbackFunc, LinkerFlagCallbackFunc dynamicLinkerFlagCallback)
+ Result<bool> Ninja::build(const SibsConfig &config, const char *savePath, LinkerFlagCallbackFunc staticLinkerFlagCallbackFunc, LinkerFlagCallbackFunc dynamicLinkerFlagCallback)
{
// TODO: Do not quit here if no source files are provided. The source-less project could have dependencies
if(sourceFiles.empty())
@@ -368,6 +368,10 @@ namespace backend
printf("Created ninja build file: %s\n", ninjaBuildFilePath.c_str());
+ Result<bool> buildResult = build(savePath);
+ if(!buildResult)
+ return buildResult;
+
Result<bool> buildTestResult = buildTests(projectGeneratedBinary);
if(!buildTestResult)
return buildTestResult;
@@ -430,7 +434,7 @@ namespace backend
if(!ninja.getSourceFiles().empty())
{
string debugBuildPath = testSourceDir + "/sibs-build/debug";
- Result<bool> buildFileResult = ninja.createBuildFile(sibsTestConfig, debugBuildPath.c_str());
+ Result<bool> buildFileResult = ninja.build(sibsTestConfig, debugBuildPath.c_str());
if (!buildFileResult)
return buildFileResult;