summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorhotwatermorning <hotwatermorning@gmail.com>2021-10-23 18:54:20 (GMT)
committerBrad King <brad.king@kitware.com>2021-10-28 19:32:44 (GMT)
commitc782f140d4dbbffec03d834e0f1b3cf5a7acb004 (patch)
tree2cba37c3f967eb7b82fda249562f79c17ae33bf7 /Source/cmGlobalGenerator.cxx
parent46bd57d2450e450da4f46f5cb45cb8d1dc617d96 (diff)
downloadCMake-c782f140d4dbbffec03d834e0f1b3cf5a7acb004.zip
CMake-c782f140d4dbbffec03d834e0f1b3cf5a7acb004.tar.gz
CMake-c782f140d4dbbffec03d834e0f1b3cf5a7acb004.tar.bz2
Swift: Ignore WIN32_EXECUTABLE property outside of Windows
Issue: #19877
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 8799180..26e2cf8 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -337,6 +337,12 @@ bool cmGlobalGenerator::CheckTargetsForType() const
bool failed = false;
for (const auto& generator : this->LocalGenerators) {
for (const auto& target : generator->GetGeneratorTargets()) {
+ std::string systemName =
+ target->Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME");
+ if (systemName.find("Windows") == std::string::npos) {
+ continue;
+ }
+
if (target->GetType() == cmStateEnums::EXECUTABLE) {
std::vector<std::string> const& configs =
target->Makefile->GetGeneratorConfigs(