[cmake-developers] Ninja: Recognize and in CMAKE_DEPFILE_FLAGS_${lang}

Thu, 22 Mar 2012 09:57:54 -0700

Hi,

I've attached a patch that allows us (ReactOS) to set(CMAKE_DEPFILE_FLAGS_RC "--preprocessor \"<CMAKE_C_COMPILER> -E -xc-header -MMD -MF <DEPFILE> -MT <OBJECT>\"") to properly track dependencies in rc files. Please note that without this, there is no dependency tracking of includes in rc files at all.

Regards,
Amine.
 Source/cmNinjaTargetGenerator.cxx |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/Source/cmNinjaTargetGenerator.cxx 
b/Source/cmNinjaTargetGenerator.cxx
index b9f997d..c0a90e3 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();
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to