diff options
author | Brad King <brad.king@kitware.com> | 2019-02-08 13:13:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-08 13:17:48 (GMT) |
commit | f87e724e8c193df3b9b30ddd0b9d2ec7c6ac2ba7 (patch) | |
tree | 493f22a8b528af6c05d4321e94b173f8b1e95b04 /Source/cmMakefile.cxx | |
parent | 6f23321d405930241fa431cfda7650f2993f0c19 (diff) | |
download | CMake-f87e724e8c193df3b9b30ddd0b9d2ec7c6ac2ba7.zip CMake-f87e724e8c193df3b9b30ddd0b9d2ec7c6ac2ba7.tar.gz CMake-f87e724e8c193df3b9b30ddd0b9d2ec7c6ac2ba7.tar.bz2 |
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 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ab139c0..7e33bda 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1985,7 +1985,9 @@ cmTarget* cmMakefile::AddLibrary(const std::string& lname, // over changes in CMakeLists.txt, making the information stale and // hence useless. target->ClearDependencyInformation(*this); - if (excludeFromAll || this->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { + if (excludeFromAll || + (type != cmStateEnums::INTERFACE_LIBRARY && + this->GetPropertyAsBool("EXCLUDE_FROM_ALL"))) { target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); } target->AddSources(srcs); |