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.
This commit is contained in:
Ben Boeckel
2023-01-31 22:46:48 -05:00
parent 8c61f15cdc
commit 4b38d7d100

View File

@@ -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;