diff options
author | Brad King <brad.king@kitware.com> | 2019-02-08 08:13:23 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-08 08:17:48 -0500 |
commit | f87e724e8c193df3b9b30ddd0b9d2ec7c6ac2ba7 (patch) | |
tree | 493f22a8b528af6c05d4321e94b173f8b1e95b04 /Tests | |
parent | 6f23321d405930241fa431cfda7650f2993f0c19 (diff) | |
download | cmake-f87e724e8c193df3b9b30ddd0b9d2ec7c6ac2ba7.tar.gz |
Fix EXCLUDE_FROM_ALL on directory with an interface library
Since commit dc6888573d (Pass EXCLUDE_FROM_ALL from directory to
targets, 2019-01-15, v3.14.0-rc1~83^2) we automatically forward the
`EXCLUDE_FROM_ALL` to targets as they are created. This regressed
support for interface libraries on which the property is not allowed.
Skip forwarding the `EXCLUDE_FROM_ALL` property for interface libraries.
It is not needed on them because they do not participate in the
generated build system anyway.
Fixes: #18896
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/InterfaceLibrary/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/InterfaceLibrary/excluded/CMakeLists.txt | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt index 6aae09ac29..954c02d511 100644 --- a/Tests/InterfaceLibrary/CMakeLists.txt +++ b/Tests/InterfaceLibrary/CMakeLists.txt @@ -47,6 +47,7 @@ target_link_libraries(InterfaceLibrary add_dependencies(InterfaceLibrary item_fake_tgt) add_subdirectory(libsdir) +add_subdirectory(excluded EXCLUDE_FROM_ALL) add_executable(sharedlibtestexe sharedlibtestexe.cpp) target_link_libraries(sharedlibtestexe shared_iface imported::iface) diff --git a/Tests/InterfaceLibrary/excluded/CMakeLists.txt b/Tests/InterfaceLibrary/excluded/CMakeLists.txt new file mode 100644 index 0000000000..69a6807c90 --- /dev/null +++ b/Tests/InterfaceLibrary/excluded/CMakeLists.txt @@ -0,0 +1 @@ +add_library(excluded_iface INTERFACE) |