[Cmake-commits] CMake branch, next, updated. v3.4.0-rc1-727-gb440006

Brad King brad.king at kitware.com
Tue Oct 20 14:43:53 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  b440006bcad4df6916b90b7505352cc866bf8b96 (commit)
       via  123de1914c7e7d53d1e295c73994b2780041b8fc (commit)
      from  1fe5b927e070f42067487b7dd0c3cac720d879bf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b440006bcad4df6916b90b7505352cc866bf8b96
commit b440006bcad4df6916b90b7505352cc866bf8b96
Merge: 1fe5b92 123de19
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 20 14:43:52 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Oct 20 14:43:52 2015 -0400

    Merge topic 'ninja-refactor-deptype-selection' into next
    
    123de191 Ninja: Refactor selection of 'deps = ' value for MS-compatible toolchains


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=123de1914c7e7d53d1e295c73994b2780041b8fc
commit 123de1914c7e7d53d1e295c73994b2780041b8fc
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 20 13:52:12 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Oct 20 14:14:20 2015 -0400

    Ninja: Refactor selection of 'deps = ' value for MS-compatible toolchains
    
    Set variables in the platform information modules to tell the Ninja
    generator what deps type to use instead of hard-coding conditions in the
    generator itself.

diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index b421b0d..a61413a 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -302,6 +302,7 @@ macro(__windows_compiler_msvc lang)
   set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
   set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
   set(CMAKE_${lang}_LINKER_SUPPORTS_PDB ON)
+  set(CMAKE_NINJA_DEPTYPE_${lang} msvc)
 
   if(NOT CMAKE_RC_COMPILER_INIT)
     set(CMAKE_RC_COMPILER_INIT rc)
@@ -311,4 +312,5 @@ macro(__windows_compiler_msvc lang)
   endif()
 
   enable_language(RC)
+  set(CMAKE_NINJA_CMCLDEPS_RC 1)
 endmacro()
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index cb1122c..b018005 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -148,17 +148,9 @@ void cmNinjaTargetGenerator::AddIncludeFlags(std::string& languageFlags,
 
 bool cmNinjaTargetGenerator::NeedDepTypeMSVC(const std::string& lang) const
 {
-  if (lang == "C" || lang == "CXX")
-    {
-    cmMakefile* mf = this->GetMakefile();
-    return (
-      strcmp(mf->GetSafeDefinition("CMAKE_C_COMPILER_ID"), "MSVC") == 0 ||
-      strcmp(mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID"), "MSVC") == 0 ||
-      strcmp(mf->GetSafeDefinition("CMAKE_C_SIMULATE_ID"), "MSVC") == 0 ||
-      strcmp(mf->GetSafeDefinition("CMAKE_CXX_SIMULATE_ID"), "MSVC") == 0
-      );
-    }
-  return false;
+  return strcmp(
+    this->GetMakefile()->GetSafeDefinition("CMAKE_NINJA_DEPTYPE_" + lang),
+    "msvc") == 0;
 }
 
 // TODO: Refactor with
@@ -359,7 +351,7 @@ cmNinjaTargetGenerator
     depfile = "";
     flags += " /showIncludes";
     }
-  else if (lang == "RC" && this->NeedDepTypeMSVC("C"))
+  else if (mf->IsOn("CMAKE_NINJA_CMCLDEPS_"+lang))
     {
     // For the MS resource compiler we need cmcldeps, but skip dependencies
     // for source-file try_compile cases because they are always fresh.

-----------------------------------------------------------------------

Summary of changes:
 Modules/Platform/Windows-MSVC.cmake |    2 ++
 Source/cmNinjaTargetGenerator.cxx   |   16 ++++------------
 2 files changed, 6 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list