From 54535f47302572616eae1f207fb0c4b9df91f828 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 9 May 2014 15:08:16 -0400 Subject: 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. --- Source/cmNinjaTargetGenerator.cxx | 6 ++++-- 1 file 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; -- cgit v0.12