summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2022-07-27 17:29:09 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2022-07-27 17:29:09 (GMT)
commit41f15193e5adfaaf9990b2d8d81bb0ec6c05572c (patch)
tree76edc6bb52a361a66ae085e11bd9a3baadd1ea24 /Source
parent22c535299019eb835dd0d5793d3b40e59d0cc6ee (diff)
downloadCMake-41f15193e5adfaaf9990b2d8d81bb0ec6c05572c.zip
CMake-41f15193e5adfaaf9990b2d8d81bb0ec6c05572c.tar.gz
CMake-41f15193e5adfaaf9990b2d8d81bb0ec6c05572c.tar.bz2
VERIFY_INTERFACE_HEADER_SETS: Fall back to global languages
If a target doesn't have any source files, fall back to the global list of enabled languages to determine the language of the header file to verify. Fixes: #23774
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 8a7215b..ee4d2e3 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -8662,6 +8662,12 @@ std::string cmGeneratorTarget::GenerateHeaderSetVerificationFile(
languages->insert("C");
}
}
+
+ if (languages->empty()) {
+ std::vector<std::string> languagesVector;
+ this->GlobalGenerator->GetEnabledLanguages(languagesVector);
+ languages->insert(languagesVector.begin(), languagesVector.end());
+ }
}
if (languages->count("CXX")) {