diff options
author | Brad King <brad.king@kitware.com> | 2015-05-07 18:01:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-05-07 18:02:44 (GMT) |
commit | 378c2a0e860f32e0435844d7d6af79a4fdc2b455 (patch) | |
tree | 3ab57abbcb7c76aeeafe4ff28316284ceea122af /Source/cmNinjaTargetGenerator.cxx | |
parent | 957c2aac7fb4833b333cf3362cb8c6918a8e8a82 (diff) | |
download | CMake-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.cxx | 2 |
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); |