mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-08 07:10:12 -05:00
Ninja: Refactor detection of MinGW tools on Windows
Check for CMAKE_COMPILER_IS_MINGW only after enabling a language when it might actually be set. Previously this worked by accident because the check for working compiler or a second language enabled would cause the code path to be taken. Store UsingMinGW as an instance member of cmGlobalNinjaGenerator so that it is reset on each reconfigure. Otherwise cmake-gui cannot switch between build trees for MinGW or non-MinGW tools.
This commit is contained in:
@@ -175,7 +175,7 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile const* source,
|
||||
// needed by cmcldeps
|
||||
false,
|
||||
this->GetConfigName());
|
||||
if(cmGlobalNinjaGenerator::IsMinGW())
|
||||
if (this->GetGlobalGenerator()->IsMinGW())
|
||||
cmSystemTools::ReplaceString(includeFlags, "\\", "/");
|
||||
|
||||
this->LocalGenerator->AppendFlags(languageFlags, includeFlags);
|
||||
|
||||
Reference in New Issue
Block a user