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
This commit is contained in:
Brad King
2021-10-18 13:38:16 +00:00
committed by Kitware Robot
12 changed files with 75 additions and 0 deletions
+6
View File
@@ -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";
}
+3
View File
@@ -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,