diff options
author | Brad King <brad.king@kitware.com> | 2015-02-23 15:26:42 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-02-23 15:26:42 (GMT) |
commit | 6dc9a627b635617870945677b4868e212f4184ed (patch) | |
tree | 347d9d2da7d3ce7aff132273cefc68cd7d3e3f78 /Source/cmMakefile.cxx | |
parent | 88aeb64ddfb129701b6709f27531da0a885593eb (diff) | |
parent | c021f59c1f2f3d892b621a9ba163b069f2a2f0a9 (diff) | |
download | CMake-6dc9a627b635617870945677b4868e212f4184ed.zip CMake-6dc9a627b635617870945677b4868e212f4184ed.tar.gz CMake-6dc9a627b635617870945677b4868e212f4184ed.tar.bz2 |
Merge topic 'minor-cleanups'
c021f59c cmMakefile: Store macro list in a vector not in a map.
2d130896 cmMakefile: Fix list of macros generation.
f1969234 cmFunctionCommand: Remove ineffectual code.
1116698a cmTarget: Don't needlessly clear vectors in the destructor.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 3c92fca..ccfe2b1 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -143,7 +143,7 @@ cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals) this->LocalGenerator = mf.LocalGenerator; this->FunctionBlockers = mf.FunctionBlockers; - this->MacrosMap = mf.MacrosMap; + this->MacrosList = mf.MacrosList; this->SubDirectoryOrder = mf.SubDirectoryOrder; this->Properties = mf.Properties; this->PreOrder = mf.PreOrder; @@ -3715,26 +3715,16 @@ cmVariableWatch *cmMakefile::GetVariableWatch() const } #endif -void cmMakefile::AddMacro(const char* name, const char* signature) +void cmMakefile::AddMacro(const char* name) { - if ( !name || !signature ) - { - return; - } - this->MacrosMap[name] = signature; + assert(name); + this->MacrosList.push_back(name); } void cmMakefile::GetListOfMacros(std::string& macros) const { - StringStringMap::const_iterator it; - macros = ""; - const char* sep = ""; - for ( it = this->MacrosMap.begin(); it != this->MacrosMap.end(); ++it ) - { - macros += sep; - macros += it->first; - sep = ""; - } + assert(macros.empty()); + macros = cmJoin(this->MacrosList, ";"); } cmCacheManager *cmMakefile::GetCacheManager() const |