aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2017-12-10 15:22:45 +0100
committerdec05eba <dec05eba@protonmail.com>2017-12-10 15:23:46 +0100
commit87c378c20c30c9251c3787f6fd5496b72511f344 (patch)
treea991bcf9cdbbae6893de066ea7794030708a3af1 /backend
parent2de986c6415478abae0fd63f4724ea506c27a15a (diff)
Do not build dependency as library if it's header only library
Diffstat (limited to 'backend')
-rw-r--r--backend/ninja/Ninja.cpp5
-rw-r--r--backend/ninja/Ninja.hpp1
2 files changed, 6 insertions, 0 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 20e2374..1185366 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -51,6 +51,11 @@ namespace backend
sourceFiles.emplace_back(filepath);
}
+ const std::vector<std::string>& Ninja::getSourceFiles() const
+ {
+ return sourceFiles;
+ }
+
bool Ninja::containsSourceFile(const char *filepath) const
{
for(const string &sourceFile : sourceFiles)
diff --git a/backend/ninja/Ninja.hpp b/backend/ninja/Ninja.hpp
index 71b12a5..3ccee1e 100644
--- a/backend/ninja/Ninja.hpp
+++ b/backend/ninja/Ninja.hpp
@@ -24,6 +24,7 @@ namespace backend
Ninja(LibraryType libraryType = LibraryType::EXECUTABLE);
void addSourceFile(const char *filepath);
+ const std::vector<std::string>& getSourceFiles() const;
sibs::Result<bool> createBuildFile(const std::string &packageName, const std::vector<sibs::Dependency> &dependencies, const char *savePath, sibs::LinkerFlagCallbackFunc linkerFlagCallbackFunc = nullptr);
sibs::Result<bool> build(const char *buildFilePath);
private: