From 4b38d7d100144b51ab1852413213716ffb9678bb Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 31 Jan 2023 22:46:48 -0500 Subject: cmGeneratorTarget: `INTERFACE` targets with C++ modules are also "in" `INTERFACE` targets with C++ modules are basically BMI-only modules. It is unknown if they will be useful directly (due to ODR of the `module M;` initializers needing to live in some specific object file). However, they will be used to attach BMI-only compilations of `IMPORTED` C++ modules. --- Source/cmGeneratorTarget.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 5e352b2..f83be26 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1222,10 +1222,12 @@ bool cmGeneratorTarget::IsInBuildSystem() const case cmStateEnums::GLOBAL_TARGET: return true; case cmStateEnums::INTERFACE_LIBRARY: - // An INTERFACE library is in the build system if it has SOURCES or - // HEADER_SETS. + // An INTERFACE library is in the build system if it has SOURCES, + // HEADER_SETS, or C++ module filesets. if (!this->SourceEntries.empty() || - !this->Target->GetHeaderSetsEntries().empty()) { + !this->Target->GetHeaderSetsEntries().empty() || + !this->Target->GetCxxModuleSetsEntries().empty() || + !this->Target->GetCxxModuleHeaderSetsEntries().empty()) { return true; } break; -- cgit v0.12