Browse Source

Ninja: Fix deptype for Intel compiler on Linux

Since commit v3.0.0-rc1~305^2 (Ninja: deptype msvc for Intel's compiler
on Windows, 2013-11-25) we used "deps = msvc" for the Intel compiler.
This is correct only on Windows.  On Linux we still want "deps = gcc".

Fix the logic to use "deps = msvc" when the compiler id or the "simulate
id" is "MSVC".  This will preserve the behavior on Intel for Windows and
fix the behavior on Intel for Linux.  In the future this should be
converted to a platform information module variable.
Brad King 11 years ago
parent
commit
54535f4730
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Source/cmNinjaTargetGenerator.cxx

+ 4 - 2
Source/cmNinjaTargetGenerator.cxx

@@ -369,8 +369,10 @@ cmNinjaTargetGenerator
   const std::string cId = mf->GetDefinition("CMAKE_C_COMPILER_ID")
                           ? mf->GetSafeDefinition("CMAKE_C_COMPILER_ID")
                           : mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID");
-
-  const bool usingMSVC = (cId == "MSVC" || cId == "Intel");
+  const std::string sId = mf->GetDefinition("CMAKE_C_SIMULATE_ID")
+                          ? mf->GetSafeDefinition("CMAKE_C_SIMULATE_ID")
+                          : mf->GetSafeDefinition("CMAKE_CXX_SIMULATE_ID");
+  const bool usingMSVC = (cId == "MSVC" || sId == "MSVC");
 
   // Tell ninja dependency format so all deps can be loaded into a database
   std::string deptype;