summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-09 19:08:16 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-09 19:11:54 (GMT)
commit54535f47302572616eae1f207fb0c4b9df91f828 (patch)
treeb2d943e325bf01cc41f507584b1625bf4ac2aad8 /Source
parent890efcb6077d01629ca29f9f54c90a1f0663033a (diff)
downloadCMake-54535f47302572616eae1f207fb0c4b9df91f828.zip
CMake-54535f47302572616eae1f207fb0c4b9df91f828.tar.gz
CMake-54535f47302572616eae1f207fb0c4b9df91f828.tar.bz2
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 900af8d..3220fba 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/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;