summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-26 17:24:39 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-03-26 17:24:39 (GMT)
commita11d1c6135fc752d1153192a02f0384e79c8094b (patch)
tree443c8e418370542af86a8ddf0d70ae581e23d929
parentf04e217cc12628559f084549f42fc1686ff769de (diff)
parent9523d2a55c99fb0910531ae7160b099faeab6638 (diff)
downloadCMake-a11d1c6135fc752d1153192a02f0384e79c8094b.zip
CMake-a11d1c6135fc752d1153192a02f0384e79c8094b.tar.gz
CMake-a11d1c6135fc752d1153192a02f0384e79c8094b.tar.bz2
Merge topic 'dev/custom-ninja-deptypes'
9523d2a5 ninja: Add support for custom depfile formats
-rw-r--r--Help/release/dev/custom-ninja-deptypes.rst5
-rw-r--r--Source/cmNinjaTargetGenerator.cxx5
2 files changed, 10 insertions, 0 deletions
diff --git a/Help/release/dev/custom-ninja-deptypes.rst b/Help/release/dev/custom-ninja-deptypes.rst
new file mode 100644
index 0000000..7750da8
--- /dev/null
+++ b/Help/release/dev/custom-ninja-deptypes.rst
@@ -0,0 +1,5 @@
+custom-ninja-deptypes
+---------------------
+
+* Add a `CMAKE_NINJA_DEPTYPE_<LANG>` variable so that compilers may set the
+ deptype for use in Ninja other than those CMake itself knows about.
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);