diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2012-03-26 03:16:15 (GMT) |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2012-03-26 03:46:12 (GMT) |
commit | 6b5614f1642dcb75fd9de9571c813b21e4f9ce2b (patch) | |
tree | a588742369a9c8dab2cff35b574121eed9669cff /Source | |
parent | c337c7e205259d5944b19c2a6d2007f490379ddc (diff) | |
download | CMake-6b5614f1642dcb75fd9de9571c813b21e4f9ce2b.zip CMake-6b5614f1642dcb75fd9de9571c813b21e4f9ce2b.tar.gz CMake-6b5614f1642dcb75fd9de9571c813b21e4f9ce2b.tar.bz2 |
Ninja: Substitute <OBJECT> and <CMAKE_C_COMPILER> in depfile flags
Patch by Amine Khaldi!
Also, start using the -MT flag to set a target name for depfiles.
This works around a bug observed in distcc, as explained in the
comment. Based on a patch by Alexander Usov.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 9acbc67..bea234f 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -331,6 +331,10 @@ cmNinjaTargetGenerator depfile = "$out.d"; cmSystemTools::ReplaceString(depfileFlagsStr, "<DEPFILE>", depfile.c_str()); + cmSystemTools::ReplaceString(depfileFlagsStr, "<OBJECT>", + "$out"); + cmSystemTools::ReplaceString(depfileFlagsStr, "<CMAKE_C_COMPILER>", + this->GetMakefile()->GetDefinition("CMAKE_C_COMPILER")); flags += " " + depfileFlagsStr; } vars.Flags = flags.c_str(); |