summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-10-14 16:40:25 (GMT)
committerBrad King <brad.king@kitware.com>2021-10-14 17:15:48 (GMT)
commit7df0541055167d556d866000f8da4b0e7f186b92 (patch)
tree20380eb5841fbb0c945901b131541652f17f6ef8 /Source/cmGeneratorTarget.cxx
parent1c12694124aedc0f7cf5a98e635e27d4c338fce0 (diff)
downloadCMake-7df0541055167d556d866000f8da4b0e7f186b92.zip
CMake-7df0541055167d556d866000f8da4b0e7f186b92.tar.gz
CMake-7df0541055167d556d866000f8da4b0e7f186b92.tar.bz2
Add property to mark IMPORTED targets as not SYSTEM
Add an `IMPORTED_NO_SYSTEM` target property to specify this. When enabled, do not treat the `INTERFACE_INCLUDE_DIRECTORIES` of an imported target as `SYSTEM` include directories. This is similar to the existing `NO_SYSTEM_FROM_IMPORTED` property, but works from the consumed target rather than the consumer. Fixes: #17364
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 8033ef5..fc02a47 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -747,6 +747,9 @@ void handleSystemIncludesDep(cmLocalGenerator* lg,
if (!depTgt->IsImported() || excludeImported) {
return;
}
+ if (depTgt->GetPropertyAsBool("IMPORTED_NO_SYSTEM")) {
+ return;
+ }
if (cmValue dirs = depTgt->GetProperty("INTERFACE_INCLUDE_DIRECTORIES")) {
cmExpandList(cmGeneratorExpression::Evaluate(*dirs, lg, config, headTarget,