summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorDa Quexian <daquexian566@gmail.com>2022-06-01 16:36:59 +0800
committerDa Quexian <daquexian566@gmail.com>2022-06-16 00:25:27 +0800
commit69beee5314f70b3ddee8029f6ab3d684035005e5 (patch)
treed7d81758ec61f5eddb58cf41768a8e598b270b51 /Source/cmGeneratorTarget.cxx
parent85dc7c763a12366d49ac2dddc53f65d52d675c00 (diff)
downloadcmake-69beee5314f70b3ddee8029f6ab3d684035005e5.tar.gz
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/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 8a7215b127..9147f8a3f8 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -807,11 +807,16 @@ void handleSystemIncludesDep(cmLocalGenerator* lg,
dagChecker, depTgt, language),
result);
}
- if (!depTgt->IsImported() || excludeImported) {
+ if (!depTgt->GetPropertyAsBool("SYSTEM")) {
return;
}
- if (depTgt->GetPropertyAsBool("IMPORTED_NO_SYSTEM")) {
- return;
+ if (depTgt->IsImported()) {
+ if (excludeImported) {
+ return;
+ }
+ if (depTgt->GetPropertyAsBool("IMPORTED_NO_SYSTEM")) {
+ return;
+ }
}
if (cmValue dirs = depTgt->GetProperty("INTERFACE_INCLUDE_DIRECTORIES")) {