diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2022-04-13 10:12:35 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-04-14 09:17:54 -0400 |
commit | d0d09aa29fa354bc13a925655c0d191bbadd4c6a (patch) | |
tree | 7edfc176da81146fd401e52a66675323559bea09 /Source | |
parent | efe08e289466683b0945a5396f6848064dec5ae0 (diff) | |
download | cmake-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.cxx | 6 |
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; |