summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2014-03-24 03:47:56 (GMT)
committerBen Boeckel <mathstuf@gmail.com>2014-03-24 03:54:13 (GMT)
commit9523d2a55c99fb0910531ae7160b099faeab6638 (patch)
tree690d2a9b3fe1a905573080a007da738f47cf7875 /Source/cmNinjaTargetGenerator.cxx
parent6f39a6ff321ca1682af684713c8ff93a21fe32ae (diff)
downloadCMake-9523d2a55c99fb0910531ae7160b099faeab6638.zip
CMake-9523d2a55c99fb0910531ae7160b099faeab6638.tar.gz
CMake-9523d2a55c99fb0910531ae7160b099faeab6638.tar.bz2
ninja: Add support for custom depfile formats
Not everything that isn't MSVC is GCC. I have support for LDC's depfile format on its way upstream[1], but its future is uncertain. CMake should at least support this for future depfile formats. [1]https://github.com/martine/ninja/pull/721
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 4319f3c..8865b3d 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -418,6 +418,11 @@ cmNinjaTargetGenerator
else
{
deptype = "gcc";
+ const char* langdeptype = mf->GetDefinition("CMAKE_NINJA_DEPTYPE_" + lang);
+ if (langdeptype)
+ {
+ deptype = langdeptype;
+ }
depfile = "$DEP_FILE";
const std::string flagsName = "CMAKE_DEPFILE_FLAGS_" + lang;
std::string depfileFlags = mf->GetSafeDefinition(flagsName);