summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetPropertyComputer.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-13 18:24:52 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-13 18:32:14 (GMT)
commit2de0e0fdfaed1c10d3b38a8fb7ff86698a0308aa (patch)
tree780e2267b79622478724bcf6681844eca61735a0 /Source/cmTargetPropertyComputer.cxx
parenta91eb5e41f486628910f189bf40403568af013c7 (diff)
downloadCMake-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/cmTargetPropertyComputer.cxx')
-rw-r--r--Source/cmTargetPropertyComputer.cxx9
1 files changed, 8 insertions, 1 deletions
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;
}