diff options
-rw-r--r-- | Help/manual/cmake-buildsystem.7.rst | 1 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 5 | ||||
-rw-r--r-- | Source/cmTargetPropertyComputer.cxx | 9 | ||||
-rw-r--r-- | Tests/InterfaceLibrary/CMakeLists.txt | 1 |
4 files changed, 9 insertions, 7 deletions
diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst index debaf23..5cfe725 100644 --- a/Help/manual/cmake-buildsystem.7.rst +++ b/Help/manual/cmake-buildsystem.7.rst @@ -970,7 +970,6 @@ are: * ``EXPORT_NAME`` * ``IMPORTED`` * ``NAME`` -* ``NO_SYSTEM_FROM_IMPORTED`` * Properties matching ``IMPORTED_LIBNAME_*`` * Properties matching ``MAP_IMPORTED_CONFIG_*`` 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; } diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt index 33c4b90..3db210a 100644 --- a/Tests/InterfaceLibrary/CMakeLists.txt +++ b/Tests/InterfaceLibrary/CMakeLists.txt @@ -64,7 +64,6 @@ target_link_libraries(iface_whitelist INTERFACE $<$<BOOL:$<TARGET_PROPERTY:CUSTO add_executable(exec_whitelist dummy.cpp) target_link_libraries(exec_whitelist iface_whitelist) -set(CMAKE_NO_SYSTEM_FROM_IMPORTED 1) add_library(iface_imported INTERFACE IMPORTED) set_property(TARGET iface_imported PROPERTY INTERFACE_COMPILE_DEFINITIONS |