From 41f15193e5adfaaf9990b2d8d81bb0ec6c05572c Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Wed, 27 Jul 2022 13:29:09 -0400 Subject: 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 --- Source/cmGeneratorTarget.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Source/cmGeneratorTarget.cxx') diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8a7215b127..ee4d2e3c09 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 languagesVector; + this->GlobalGenerator->GetEnabledLanguages(languagesVector); + languages->insert(languagesVector.begin(), languagesVector.end()); + } } if (languages->count("CXX")) { -- cgit v1.2.1