summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-11-21 15:42:24 (GMT)
committerBrad King <brad.king@kitware.com>2016-11-21 16:42:01 (GMT)
commit460052516fdd06a2c0c765359f4d92006e67283b (patch)
tree2513452bbe0c92c0b81b9742cc1272b3e7c4f91a /Source/cmTarget.cxx
parentacde2c4a5389bfe5b1af697a02c160060db7d6e8 (diff)
downloadCMake-460052516fdd06a2c0c765359f4d92006e67283b.zip
CMake-460052516fdd06a2c0c765359f4d92006e67283b.tar.gz
CMake-460052516fdd06a2c0c765359f4d92006e67283b.tar.bz2
Allow NO_SYSTEM_FROM_IMPORTED on imported INTERFACE libraries
Imported INTERFACE libraries can specify include directories via `INTERFACE_INCLUDE_DIRECTORIES` so the default behavior of treating them as system include directories applies. Allow users to turn this off by setting `NO_SYSTEM_FROM_IMPORTED` on such targets. Closes: #16443
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 54bdfe6..f5d9e61 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -253,7 +253,6 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
this->SetPropertyDefault("WIN32_EXECUTABLE", CM_NULLPTR);
this->SetPropertyDefault("MACOSX_BUNDLE", CM_NULLPTR);
this->SetPropertyDefault("MACOSX_RPATH", CM_NULLPTR);
- this->SetPropertyDefault("NO_SYSTEM_FROM_IMPORTED", CM_NULLPTR);
this->SetPropertyDefault("C_CLANG_TIDY", CM_NULLPTR);
this->SetPropertyDefault("C_COMPILER_LAUNCHER", CM_NULLPTR);
this->SetPropertyDefault("C_INCLUDE_WHAT_YOU_USE", CM_NULLPTR);
@@ -271,6 +270,10 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
this->SetPropertyDefault("LINK_SEARCH_END_STATIC", CM_NULLPTR);
}
+ if (this->GetType() != cmStateEnums::UTILITY) {
+ this->SetPropertyDefault("NO_SYSTEM_FROM_IMPORTED", CM_NULLPTR);
+ }
+
// Collect the set of configuration types.
std::vector<std::string> configNames;
mf->GetConfigurations(configNames);