summaryrefslogtreecommitdiffstats
path: root/Source/cmCommonTargetGenerator.cxx
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-06-08 11:23:25 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-10 13:24:49 (GMT)
commitf62ed322dc0d859f595be5ddeff40904ee478f50 (patch)
tree454be55cfcb19e1775cabc0786020e5ec7298260 /Source/cmCommonTargetGenerator.cxx
parent853b1bb4ba176e886e3682a2475f1de1932ee890 (diff)
downloadCMake-f62ed322dc0d859f595be5ddeff40904ee478f50.zip
CMake-f62ed322dc0d859f595be5ddeff40904ee478f50.tar.gz
CMake-f62ed322dc0d859f595be5ddeff40904ee478f50.tar.bz2
cmLocalGenerator: Add GetTargetDefines to get all defines for a target
Diffstat (limited to 'Source/cmCommonTargetGenerator.cxx')
-rw-r--r--Source/cmCommonTargetGenerator.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index 131b490..b893dd3 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -246,19 +246,11 @@ std::string cmCommonTargetGenerator::GetDefines(const std::string& l)
ByLanguageMap::iterator i = this->DefinesByLanguage.find(l);
if (i == this->DefinesByLanguage.end()) {
std::set<std::string> defines;
- const char* lang = l.c_str();
- // Add the export symbol definition for shared library objects.
- if (const char* exportMacro = this->GeneratorTarget->GetExportMacro()) {
- this->LocalGenerator->AppendDefines(defines, exportMacro);
- }
-
- // Add preprocessor definitions for this target and configuration.
- this->LocalGenerator->AddCompileDefinitions(
- defines, this->GeneratorTarget, this->LocalGenerator->GetConfigName(),
- l);
+ this->LocalGenerator->GetTargetDefines(this->GeneratorTarget,
+ this->ConfigName, l, defines);
std::string definesString;
- this->LocalGenerator->JoinDefines(defines, definesString, lang);
+ this->LocalGenerator->JoinDefines(defines, definesString, l);
ByLanguageMap::value_type entry(l, definesString);
i = this->DefinesByLanguage.insert(entry).first;