aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/ninja/Ninja.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 9dd3ecc..7c1de91 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -378,12 +378,15 @@ namespace backend
};
}
- // TODO: If project contains no source files, then we shouldn't override this function
- dynamicLinkerFlagCallback = [&allLinkerFlags](const string &linkerFlag)
+ // TODO: Do same for cmake
+ if (!sourceFiles.empty())
{
- allLinkerFlags += " ";
- allLinkerFlags += linkerFlag;
- };
+ dynamicLinkerFlagCallback = [&allLinkerFlags](const string &linkerFlag)
+ {
+ allLinkerFlags += " ";
+ allLinkerFlags += linkerFlag;
+ };
+ }
string cflags;
auto cflagsCallbackFunc = [&cflags](const string &dependencyCflags)