summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-03-12 15:37:11 (GMT)
committerBrad King <brad.king@kitware.com>2018-03-12 15:45:01 (GMT)
commit2deb9b7f3495a9083b8d5341f867fed615da1470 (patch)
tree2dbffba599be936e428fba19c83f99a78c765037 /Source/cmLocalGenerator.cxx
parentc5541cf0da1093635fea7da5a40e64e481b5477e (diff)
downloadCMake-2deb9b7f3495a9083b8d5341f867fed615da1470.zip
CMake-2deb9b7f3495a9083b8d5341f867fed615da1470.tar.gz
CMake-2deb9b7f3495a9083b8d5341f867fed615da1470.tar.bz2
Genex: Fix COMPILE_LANGUAGE in SYSTEM include directories
When evaluating `INTERFACE_SYSTEM_INCLUDE_DIRECTORIES`, or evaluating `INTERFACE_INCLUDE_DIRECTORIES` on an imported target, thread the compile language through to the generator expression evaluator so that it can support `$<COMPILE_LANGUAGE:...>`. Fixes: #17811
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 08f3c0f..cee540b 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -718,7 +718,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir);
if (emitted.insert(frameworkDir).second) {
if (sysFwSearchFlag && target &&
- target->IsSystemIncludeDirectory(i, config)) {
+ target->IsSystemIncludeDirectory(i, config, lang)) {
includeFlags << sysFwSearchFlag;
} else {
includeFlags << fwSearchFlag;
@@ -731,7 +731,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
if (!flagUsed || repeatFlag) {
if (sysIncludeFlag && target &&
- target->IsSystemIncludeDirectory(i, config)) {
+ target->IsSystemIncludeDirectory(i, config, lang)) {
includeFlags << sysIncludeFlag;
} else {
includeFlags << includeFlag;