diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-06-16 18:51:30 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2022-07-06 14:15:23 (GMT) |
commit | f3cfde394a903928cc379f3a56a9cb9618def665 (patch) | |
tree | cfe08d26ac37a4b3d378f0269883f1906a32a591 /Source/cmTargetSourcesCommand.cxx | |
parent | ea3175a4ebba7bf8688f2f62f434a1602012ab61 (diff) | |
download | CMake-f3cfde394a903928cc379f3a56a9cb9618def665.zip CMake-f3cfde394a903928cc379f3a56a9cb9618def665.tar.gz CMake-f3cfde394a903928cc379f3a56a9cb9618def665.tar.bz2 |
cmTargetSourcesCommand: allow `INTERFACE` C++ modules when imported
`PUBLIC` filesets become `INTERFACE` upon installation. Allow
`INTERFACE` scopes for C++ modules when the target is imported.
Diffstat (limited to 'Source/cmTargetSourcesCommand.cxx')
-rw-r--r-- | Source/cmTargetSourcesCommand.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmTargetSourcesCommand.cxx b/Source/cmTargetSourcesCommand.cxx index 76b0384..74945fa 100644 --- a/Source/cmTargetSourcesCommand.cxx +++ b/Source/cmTargetSourcesCommand.cxx @@ -269,7 +269,8 @@ bool TargetSourcesImpl::HandleOneFileSet( } if (cmFileSetVisibilityIsForInterface(visibility) && - !cmFileSetVisibilityIsForSelf(visibility)) { + !cmFileSetVisibilityIsForSelf(visibility) && + !this->Target->IsImported()) { if (type == "CXX_MODULES"_s || type == "CXX_MODULE_HEADER_UNITS"_s) { this->SetError( R"(File set TYPEs "CXX_MODULES" and "CXX_MODULE_HEADER_UNITS" may not have "INTERFACE" visibility)"); |