summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-28 12:11:00 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-03-28 12:11:08 (GMT)
commitfbe739ec61370155205eba5d1107bfd5ccac54f5 (patch)
treeadcb3708a5d01438f1dd3470d07cbd367e4a9980
parent381327c944dc60ccc418e110c5afee85462cfea4 (diff)
parenta67cd9c39cc82fa934cc047c719fae8995ff215c (diff)
downloadCMake-fbe739ec61370155205eba5d1107bfd5ccac54f5.zip
CMake-fbe739ec61370155205eba5d1107bfd5ccac54f5.tar.gz
CMake-fbe739ec61370155205eba5d1107bfd5ccac54f5.tar.bz2
Merge topic 'mingw-slashes' into release-3.26
a67cd9c39c Ninja: Restore slash style for MinGW tools when extra languages are enabled Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8368
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx10
-rw-r--r--Source/cmGlobalNinjaGenerator.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 914d1c7..f8e97db 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -956,8 +956,9 @@ void cmGlobalNinjaGenerator::EnableLanguage(
mf->GetSafeDefinition(cmStrCat("CMAKE_", l, "_SIMULATE_ID"));
std::string const& compilerFrontendVariant = mf->GetSafeDefinition(
cmStrCat("CMAKE_", l, "_COMPILER_FRONTEND_VARIANT"));
- this->SetUsingGCCOnWindows(
- DetectGCCOnWindows(compilerId, simulateId, compilerFrontendVariant));
+ if (DetectGCCOnWindows(compilerId, simulateId, compilerFrontendVariant)) {
+ this->MarkAsGCCOnWindows();
+ }
#endif
}
}
@@ -2843,8 +2844,9 @@ int cmcmd_cmake_ninja_dyndep(std::vector<std::string>::const_iterator argBeg,
cmGlobalNinjaGenerator& gg =
cm::static_reference_cast<cmGlobalNinjaGenerator>(ggd);
# ifdef _WIN32
- gg.SetUsingGCCOnWindows(
- DetectGCCOnWindows(compilerId, simulateId, compilerFrontendVariant));
+ if (DetectGCCOnWindows(compilerId, simulateId, compilerFrontendVariant)) {
+ gg.MarkAsGCCOnWindows();
+ }
# endif
return gg.WriteDyndepFile(dir_top_src, dir_top_bld, dir_cur_src, dir_cur_bld,
arg_dd, arg_ddis, module_dir, linked_target_dirs,
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 68b26cc..7f01b09 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -169,7 +169,7 @@ public:
const std::string& comment = "");
bool IsGCCOnWindows() const { return this->UsingGCCOnWindows; }
- void SetUsingGCCOnWindows(bool b) { this->UsingGCCOnWindows = b; }
+ void MarkAsGCCOnWindows() { this->UsingGCCOnWindows = true; }
cmGlobalNinjaGenerator(cmake* cm);