summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-16 14:33:12 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-01-16 14:33:23 (GMT)
commitb4dfe1d8163055f9f40a4c18f5eccccb28f06559 (patch)
tree43bfa7f2daa92077ac51e4256887684cf419d477 /Source/cmGlobalXCodeGenerator.cxx
parent7accd7ebe2b6e9999e427c23a81c6e6811033a1d (diff)
parent506fda1cf026a88378589009b62ca8bf633c5197 (diff)
downloadCMake-b4dfe1d8163055f9f40a4c18f5eccccb28f06559.zip
CMake-b4dfe1d8163055f9f40a4c18f5eccccb28f06559.tar.gz
CMake-b4dfe1d8163055f9f40a4c18f5eccccb28f06559.tar.bz2
Merge topic 'extend-compile-language-genex'
506fda1c Genex: Enable COMPILE_LANGUAGE for INCLUDE_DIRECTORIES with VS and Xcode c2f79c98 Genex: Enable COMPILE_LANGUAGE for COMPILE_DEFINITIONS with VS and Xcode 0795d25b cmVisualStudio10TargetGenerator: Factor out include dir computation 1ab4d186 cmLocalVisualStudio7Generator: Clarify variable name of compiled language 07e1a743 cmLocalVisualStudio7Generator: Clarify condition for target that compiles Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1657
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 338c2b4..bd51f60 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1703,6 +1703,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
gtgt->GetName().c_str());
return;
}
+ std::string const& langForPreprocessor = llang;
if (gtgt->IsIPOEnabled(llang, configName)) {
const char* ltoValue =
@@ -1723,7 +1724,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
this->AppendDefines(ppDefs, exportMacro);
}
std::vector<std::string> targetDefines;
- gtgt->GetCompileDefinitions(targetDefines, configName, "C");
+ if (!langForPreprocessor.empty()) {
+ gtgt->GetCompileDefinitions(targetDefines, configName,
+ langForPreprocessor);
+ }
this->AppendDefines(ppDefs, targetDefines);
buildSettings->AddAttribute("GCC_PREPROCESSOR_DEFINITIONS",
ppDefs.CreateList());
@@ -1996,8 +2000,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
const bool emitSystemIncludes = this->XcodeVersion >= 83;
std::vector<std::string> includes;
- this->CurrentLocalGenerator->GetIncludeDirectories(includes, gtgt, "C",
- configName);
+ if (!langForPreprocessor.empty()) {
+ this->CurrentLocalGenerator->GetIncludeDirectories(
+ includes, gtgt, langForPreprocessor, configName);
+ }
std::set<std::string> emitted;
emitted.insert("/System/Library/Frameworks");