diff options
author | Brad King <brad.king@kitware.com> | 2015-07-09 14:15:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-09 14:15:08 (GMT) |
commit | fed5eb5b0e0e955bf01351b93c43cc248fd9f5ed (patch) | |
tree | 2c971b644d5c122ce423ce67492be840be5b2962 /Source/cmNinjaTargetGenerator.cxx | |
parent | eacacacdceb4a259ba76edb2219c7f8e6cb3f47e (diff) | |
download | CMake-fed5eb5b0e0e955bf01351b93c43cc248fd9f5ed.zip CMake-fed5eb5b0e0e955bf01351b93c43cc248fd9f5ed.tar.gz CMake-fed5eb5b0e0e955bf01351b93c43cc248fd9f5ed.tar.bz2 |
cmNinjaTargetGenerator: Use GetDefines method
Simplify the per-source ComputeDefines implementation by getting
target-wide defines from GetDefines. Technically this changes behavior
by no-longer de-duplicating/sorting defines from both the target and the
source, but this makes it consistent with the Makefile generator. It
may also later help move target-wide defines into per-target compilation
rules.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 05120da..a72bc72 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -163,16 +163,6 @@ cmNinjaTargetGenerator:: ComputeDefines(cmSourceFile const* source, const std::string& language) { std::set<std::string> defines; - - // Add the export symbol definition for shared library objects. - if(const char* exportMacro = this->Target->GetExportMacro()) - { - this->LocalGenerator->AppendDefines(defines, exportMacro); - } - - // Add preprocessor definitions for this target and configuration. - this->LocalGenerator->AddCompileDefinitions(defines, this->Target, - this->GetConfigName(), language); this->LocalGenerator->AppendDefines (defines, source->GetProperty("COMPILE_DEFINITIONS")); @@ -184,7 +174,7 @@ ComputeDefines(cmSourceFile const* source, const std::string& language) source->GetProperty(defPropName)); } - std::string definesString; + std::string definesString = this->GetDefines(language); this->LocalGenerator->JoinDefines(defines, definesString, language); |