summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-10-18 13:38:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-10-18 13:38:28 (GMT)
commit2d620e83809b64fa26ed098086d66095d91ab7cb (patch)
tree737cd253d6c968982a999ce7ff074a0f001465c5 /Source
parent1a1a8ff8584f1b4736cc72a8e9834c479ed34c5e (diff)
parent14d98bcfe6fa1dd2f4220e50e99ec099939496d5 (diff)
downloadCMake-2d620e83809b64fa26ed098086d66095d91ab7cb.zip
CMake-2d620e83809b64fa26ed098086d66095d91ab7cb.tar.gz
CMake-2d620e83809b64fa26ed098086d66095d91ab7cb.tar.bz2
Merge topic 'imported-no-system'
14d98bcfe6 export: Propagate IMPORTED_NO_SYSTEM target property to consumers 7df0541055 Add property to mark IMPORTED targets as not SYSTEM Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Allison Vacanti <alliepiper16@gmail.com> Merge-request: !6627
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExportFileGenerator.cxx6
-rw-r--r--Source/cmGeneratorTarget.cxx3
2 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index c0a4cdc..0eda92c 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -1072,6 +1072,12 @@ void cmExportFileGenerator::GenerateImportTargetCode(
os << "set_property(TARGET " << targetName << " PROPERTY DEPRECATION "
<< cmExportFileGeneratorEscape(target->GetDeprecation()) << ")\n";
}
+
+ if (target->GetPropertyAsBool("IMPORTED_NO_SYSTEM")) {
+ os << "set_property(TARGET " << targetName
+ << " PROPERTY IMPORTED_NO_SYSTEM 1)\n";
+ }
+
os << "\n";
}
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,