summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExtraSublimeTextGenerator.cxx7
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx9
-rw-r--r--Source/cmLocalGenerator.cxx14
-rw-r--r--Source/cmLocalGenerator.h4
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx4
-rw-r--r--Source/cmQtAutoGenInitializer.cxx2
6 files changed, 9 insertions, 31 deletions
diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx
index c4cca07..882d39f 100644
--- a/Source/cmExtraSublimeTextGenerator.cxx
+++ b/Source/cmExtraSublimeTextGenerator.cxx
@@ -384,13 +384,8 @@ std::string cmExtraSublimeTextGenerator::ComputeDefines(
cmGeneratorExpressionInterpreter genexInterpreter(lg, config, target,
language);
- // Add the export symbol definition for shared library objects.
- if (const char* exportMacro = target->GetExportMacro()) {
- lg->AppendDefines(defines, exportMacro);
- }
-
// Add preprocessor definitions for this target and configuration.
- lg->AddCompileDefinitions(defines, target, config, language);
+ lg->GetTargetDefines(target, config, language, defines);
const std::string COMPILE_DEFINITIONS("COMPILE_DEFINITIONS");
if (const char* compile_defs = source->GetProperty(COMPILE_DEFINITIONS)) {
lg->AppendDefines(
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 847230a..4d98d55 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -267,14 +267,9 @@ std::string cmGhsMultiTargetGenerator::GetDefines(const std::string& language,
if (i == this->DefinesByLanguage.end()) {
std::set<std::string> defines;
const char* lang = language.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,
- config, language);
+ this->LocalGenerator->GetTargetDefines(this->GeneratorTarget, config,
+ language, defines);
std::string definesString;
this->LocalGenerator->JoinDefines(defines, definesString, lang);
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 7030725..40e183c 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -773,16 +773,6 @@ std::string cmLocalGenerator::GetIncludeFlags(
return flags;
}
-void cmLocalGenerator::AddCompileDefinitions(std::set<std::string>& defines,
- cmGeneratorTarget const* target,
- const std::string& config,
- const std::string& lang) const
-{
- std::vector<std::string> targetDefines;
- target->GetCompileDefinitions(targetDefines, config, lang);
- this->AppendDefines(defines, targetDefines);
-}
-
void cmLocalGenerator::AddCompileOptions(std::string& flags,
cmGeneratorTarget* target,
const std::string& lang,
@@ -1237,7 +1227,9 @@ void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget const* target,
}
// Add preprocessor definitions for this target and configuration.
- this->AddCompileDefinitions(defines, target, config, lang);
+ std::vector<std::string> targetDefines;
+ target->GetCompileDefinitions(targetDefines, config, lang);
+ this->AppendDefines(defines, targetDefines);
}
std::string cmLocalGenerator::GetTargetFortranFlags(
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 58b7762..f8d70ca 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -251,10 +251,6 @@ public:
bool appendAllImplicitDirs = false) const;
void AddCompileOptions(std::string& flags, cmGeneratorTarget* target,
const std::string& lang, const std::string& config);
- void AddCompileDefinitions(std::set<std::string>& defines,
- cmGeneratorTarget const* target,
- const std::string& config,
- const std::string& lang) const;
std::string GetProjectName() const;
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 4d19b3a..68cdef0 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1819,8 +1819,8 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo(
// Build a list of preprocessor definitions for the target.
std::set<std::string> defines;
- this->AddCompileDefinitions(defines, target, this->ConfigName,
- implicitLang.first);
+ this->GetTargetDefines(target, this->ConfigName, implicitLang.first,
+ defines);
if (!defines.empty()) {
/* clang-format off */
cmakefileStream
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 8a202a2..6bc3b61 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -416,7 +416,7 @@ bool cmQtAutoGenInitializer::InitMoc()
auto GetCompileDefinitions =
[this, localGen](std::string const& cfg) -> std::string {
std::set<std::string> defines;
- localGen->AddCompileDefinitions(defines, this->Target, cfg, "CXX");
+ localGen->GetTargetDefines(this->Target, cfg, "CXX", defines);
return cmJoin(defines, ";");
};