summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2022-04-13 10:12:35 -0400
committerBrad King <brad.king@kitware.com>2022-04-14 09:17:54 -0400
commitd0d09aa29fa354bc13a925655c0d191bbadd4c6a (patch)
tree7edfc176da81146fd401e52a66675323559bea09 /Source
parentefe08e289466683b0945a5396f6848064dec5ae0 (diff)
downloadcmake-d0d09aa29fa354bc13a925655c0d191bbadd4c6a.tar.gz
FILE_SET: Make INTERFACE libraries with HEADER_SETS participate in buildsystem
If an INTERFACE library has HEADER_SETS, and its header sets contain files generated by a custom command, the library needs to participate in the buildsystem so that the files will be generated. Fixes: #23422
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index a8bc91cecc..fec4679086 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1208,8 +1208,10 @@ 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.
- if (!this->SourceEntries.empty()) {
+ // An INTERFACE library is in the build system if it has SOURCES or
+ // HEADER_SETS.
+ if (!this->SourceEntries.empty() ||
+ !this->Target->GetHeaderSetsEntries().empty()) {
return true;
}
break;