summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorDa Quexian <daquexian566@gmail.com>2022-06-01 08:36:59 (GMT)
committerDa Quexian <daquexian566@gmail.com>2022-06-15 16:25:27 (GMT)
commit69beee5314f70b3ddee8029f6ab3d684035005e5 (patch)
treed7d81758ec61f5eddb58cf41768a8e598b270b51 /Source/cmTarget.cxx
parent85dc7c763a12366d49ac2dddc53f65d52d675c00 (diff)
downloadCMake-69beee5314f70b3ddee8029f6ab3d684035005e5.zip
CMake-69beee5314f70b3ddee8029f6ab3d684035005e5.tar.gz
CMake-69beee5314f70b3ddee8029f6ab3d684035005e5.tar.bz2
Add SYSTEM target property
If it is ON, treat INTERFACE_INCLUDE_DIRECTORIES as system include directories. Issue: #18040 Signed-off-by: Da Quexian <daquexian566@gmail.com>
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 83dc1c2..d5b9b06 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -759,6 +759,10 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
}
}
+ if (this->IsImported()) {
+ this->SetProperty("SYSTEM", "ON");
+ }
+
for (auto const& prop : mf->GetState()->GetPropertyDefinitions().GetMap()) {
if (prop.first.second == cmProperty::TARGET &&
!prop.second.GetInitializeFromVariable().empty()) {