summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-16 13:51:43 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-10-16 13:51:46 (GMT)
commit60f982aab4fc99bab5cafee1db148f61ba3b9d77 (patch)
tree31986300b0f49bacc611016c789007999a730f73 /Source
parent800c0e810520bd6fe2827c9c89b0b863df1592b9 (diff)
parent22beb07f9871338c3cdc1ce47bf1da0433519547 (diff)
downloadCMake-60f982aab4fc99bab5cafee1db148f61ba3b9d77.zip
CMake-60f982aab4fc99bab5cafee1db148f61ba3b9d77.tar.gz
CMake-60f982aab4fc99bab5cafee1db148f61ba3b9d77.tar.bz2
Merge topic 'imported-interface-no-system'
22beb07f Help: Clarify documentation of NO_SYSTEM_FROM_IMPORTED 2de0e0fd Do not initialize NO_SYSTEM_FROM_IMPORTED on INTERFACE libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1386
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx5
-rw-r--r--Source/cmTargetPropertyComputer.cxx9
2 files changed, 9 insertions, 5 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);
diff --git a/Source/cmTargetPropertyComputer.cxx b/Source/cmTargetPropertyComputer.cxx
index 3a3c165..1d2520d 100644
--- a/Source/cmTargetPropertyComputer.cxx
+++ b/Source/cmTargetPropertyComputer.cxx
@@ -66,12 +66,19 @@ bool cmTargetPropertyComputer::WhiteListedInterfaceProperty(
}
if (prop == "IMPORTED_CONFIGURATIONS" || prop == "IMPORTED_LIBNAME" ||
- prop == "NO_SYSTEM_FROM_IMPORTED" ||
cmHasLiteralPrefix(prop, "IMPORTED_LIBNAME_") ||
cmHasLiteralPrefix(prop, "MAP_IMPORTED_CONFIG_")) {
return true;
}
+ // This property should not be allowed but was incorrectly added in
+ // CMake 3.8. We can't remove it from the whitelist without breaking
+ // projects that try to set it. One day we could warn about this, but
+ // for now silently accept it.
+ if (prop == "NO_SYSTEM_FROM_IMPORTED") {
+ return true;
+ }
+
return false;
}