diff options
author | Brad King <brad.king@kitware.com> | 2017-10-13 18:24:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-10-13 18:32:14 (GMT) |
commit | 2de0e0fdfaed1c10d3b38a8fb7ff86698a0308aa (patch) | |
tree | 780e2267b79622478724bcf6681844eca61735a0 /Source/cmTarget.cxx | |
parent | a91eb5e41f486628910f189bf40403568af013c7 (diff) | |
download | CMake-2de0e0fdfaed1c10d3b38a8fb7ff86698a0308aa.zip CMake-2de0e0fdfaed1c10d3b38a8fb7ff86698a0308aa.tar.gz CMake-2de0e0fdfaed1c10d3b38a8fb7ff86698a0308aa.tar.bz2 |
Do not initialize NO_SYSTEM_FROM_IMPORTED on INTERFACE libraries
The change in commit v3.8.0-rc1~276^2 (Allow NO_SYSTEM_FROM_IMPORTED on
imported INTERFACE libraries, 2016-11-21) was incorrect. The property
is not meant to be set on imported targets at all. It is meant to be
set on their consumers that compile sources. Since INTERFACE libraries
have no sources to compile, the property is not needed on them.
Revert most of that change. Unfortunately we must still tolerate
project code setting NO_SYSTEM_FROM_IMPORTED on INTERFACE libraries
because they were allowed by CMake 3.8 and 3.9.
Issue: #17348
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 7a3cc76..c6cd502 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -256,6 +256,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, this->SetPropertyDefault("WIN32_EXECUTABLE", nullptr); this->SetPropertyDefault("MACOSX_BUNDLE", nullptr); this->SetPropertyDefault("MACOSX_RPATH", nullptr); + this->SetPropertyDefault("NO_SYSTEM_FROM_IMPORTED", nullptr); this->SetPropertyDefault("BUILD_WITH_INSTALL_NAME_DIR", nullptr); this->SetPropertyDefault("C_CLANG_TIDY", nullptr); this->SetPropertyDefault("C_COMPILER_LAUNCHER", nullptr); @@ -282,10 +283,6 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, this->SetPropertyDefault("LINK_SEARCH_END_STATIC", nullptr); } - if (this->GetType() != cmStateEnums::UTILITY) { - this->SetPropertyDefault("NO_SYSTEM_FROM_IMPORTED", nullptr); - } - // Collect the set of configuration types. std::vector<std::string> configNames; mf->GetConfigurations(configNames); |