Commit b7d5ef23 authored by Zsolt Parragi's avatar Zsolt Parragi

cmGlobalNinjaGenerator: use gnu compatible paths with clang in gnu mode

parent 3d0210d8
......@@ -639,13 +639,20 @@ void cmGlobalNinjaGenerator::EnableLanguage(
this->ResolveLanguageCompiler(l, mf, optional);
}
#ifdef _WIN32
if ((mf->GetSafeDefinition("CMAKE_C_SIMULATE_ID") != "MSVC") &&
(mf->GetSafeDefinition("CMAKE_CXX_SIMULATE_ID") != "MSVC") &&
(mf->IsOn("CMAKE_COMPILER_IS_MINGW") ||
(mf->GetSafeDefinition("CMAKE_C_COMPILER_ID") == "GNU") ||
(mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID") == "GNU") ||
(mf->GetSafeDefinition("CMAKE_C_COMPILER_ID") == "Clang") ||
(mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID") == "Clang"))) {
const bool clangGnuMode =
((mf->GetSafeDefinition("CMAKE_C_COMPILER_ID") == "Clang") &&
(mf->GetSafeDefinition("CMAKE_C_COMPILER_FRONTEND_VARIANT") == "GNU")) ||
((mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID") == "Clang") &&
(mf->GetSafeDefinition("CMAKE_CXX_COMPILER_FRONTEND_VARIANT") == "GNU"));
if (clangGnuMode ||
((mf->GetSafeDefinition("CMAKE_C_SIMULATE_ID") != "MSVC") &&
(mf->GetSafeDefinition("CMAKE_CXX_SIMULATE_ID") != "MSVC") &&
(mf->IsOn("CMAKE_COMPILER_IS_MINGW") ||
(mf->GetSafeDefinition("CMAKE_C_COMPILER_ID") == "GNU") ||
(mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID") == "GNU") ||
(mf->GetSafeDefinition("CMAKE_C_COMPILER_ID") == "Clang") ||
(mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID") == "Clang")))) {
this->UsingGCCOnWindows = true;
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment