aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/GlobalLib.cpp6
-rw-r--r--src/main.cpp9
2 files changed, 2 insertions, 13 deletions
diff --git a/src/GlobalLib.cpp b/src/GlobalLib.cpp
index c38e22f..30a044f 100644
--- a/src/GlobalLib.cpp
+++ b/src/GlobalLib.cpp
@@ -203,14 +203,10 @@ namespace sibs
if(createBuildDirResult.isErr())
return Result<string>::Err(createBuildDirResult);
- Result<bool> buildFileResult = ninja.createBuildFile(sibsConfig, debugBuildPath.c_str(), staticLinkerFlagCallbackFunc, dynamicLinkerFlagCallbackFunc);
+ Result<bool> buildFileResult = ninja.build(sibsConfig, debugBuildPath.c_str(), staticLinkerFlagCallbackFunc, dynamicLinkerFlagCallbackFunc);
if (buildFileResult.isErr())
return Result<string>::Err(buildFileResult.getErrMsg());
- Result<bool> buildResult = ninja.build(debugBuildPath.c_str());
- if (buildResult.isErr())
- return Result<string>::Err(buildResult.getErrMsg());
-
return Result<string>::Ok(libPath);
}
}
diff --git a/src/main.cpp b/src/main.cpp
index 3d970f4..e645b70 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -187,20 +187,13 @@ int buildProject(int argc, const char **argv)
walkDir(projectPath.c_str(), collectSourceFiles);
string debugBuildPath = projectPath + "/sibs-build/debug";
- Result<bool> buildFileResult = ninja.createBuildFile(sibsConfig, debugBuildPath.c_str());
+ Result<bool> buildFileResult = ninja.build(sibsConfig, debugBuildPath.c_str());
if(buildFileResult.isErr())
{
cerr << "Failed to build ninja file: " << buildFileResult.getErrMsg() << endl;
exit(7);
}
- Result<bool> buildResult = ninja.build(debugBuildPath.c_str());
- if(buildResult.isErr())
- {
- cerr << "Failed to build ninja file: " << buildResult.getErrMsg() << endl;
- exit(8);
- }
-
return 0;
}