summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-07 18:01:58 (GMT)
committerBrad King <brad.king@kitware.com>2015-05-07 18:02:44 (GMT)
commit378c2a0e860f32e0435844d7d6af79a4fdc2b455 (patch)
tree3ab57abbcb7c76aeeafe4ff28316284ceea122af /Source/cmNinjaTargetGenerator.cxx
parent957c2aac7fb4833b333cf3362cb8c6918a8e8a82 (diff)
downloadCMake-378c2a0e860f32e0435844d7d6af79a4fdc2b455.zip
CMake-378c2a0e860f32e0435844d7d6af79a4fdc2b455.tar.gz
CMake-378c2a0e860f32e0435844d7d6af79a4fdc2b455.tar.bz2
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.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index dfd3c04..a3c9be6 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -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);