diff options
author | Brad King <brad.king@kitware.com> | 2015-07-21 13:22:23 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-07-21 13:22:23 (GMT) |
commit | 5b2754d41fcef287ff76c9d909d9bc2f506b4d03 (patch) | |
tree | 61e454cb8a0e13e58b50da681ffa2b728d89667c | |
parent | e13c18974307ecd0f11e2ecfde64f1aea80c6304 (diff) | |
parent | 41bb831fc910d85d79811dc367b25c0880cbe6ac (diff) | |
download | CMake-5b2754d41fcef287ff76c9d909d9bc2f506b4d03.zip CMake-5b2754d41fcef287ff76c9d909d9bc2f506b4d03.tar.gz CMake-5b2754d41fcef287ff76c9d909d9bc2f506b4d03.tar.bz2 |
Merge topic 'remove-special-MACROS-handling'
41bb831f cmMakefile: Remove special handling of MACROS property.
-rw-r--r-- | Source/cmGetCMakePropertyCommand.cxx | 5 | ||||
-rw-r--r-- | Source/cmMacroCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 17 | ||||
-rw-r--r-- | Source/cmMakefile.h | 13 |
4 files changed, 5 insertions, 32 deletions
diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx index 5a1644c..248ce59 100644 --- a/Source/cmGetCMakePropertyCommand.cxx +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -40,7 +40,10 @@ bool cmGetCMakePropertyCommand else if ( args[1] == "MACROS" ) { output.clear(); - this->Makefile->GetListOfMacros(output); + if (const char* macrosProp = this->Makefile->GetProperty("MACROS")) + { + output = macrosProp; + } } else if ( args[1] == "COMPONENTS" ) { diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 6d3054a..fa5a623 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -211,7 +211,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, // if this is the endmacro for this macro then execute if (!this->Depth) { - mf.AddMacro(this->Args[0].c_str()); + mf.AppendProperty("MACROS", this->Args[0].c_str()); // create a new command and add it to cmake cmMacroHelperCommand *f = new cmMacroHelperCommand(); f->Args = this->Args; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index cacca1f..ae69b24 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3808,18 +3808,6 @@ cmVariableWatch *cmMakefile::GetVariableWatch() const } #endif -void cmMakefile::AddMacro(const char* name) -{ - assert(name); - this->MacrosList.push_back(name); -} - -void cmMakefile::GetListOfMacros(std::string& macros) const -{ - assert(macros.empty()); - macros = cmJoin(this->MacrosList, ";"); -} - cmState *cmMakefile::GetState() const { return this->GetCMakeInstance()->GetState(); @@ -4243,11 +4231,6 @@ const char *cmMakefile::GetProperty(const std::string& prop, output = cmJoin(this->GetDefinitions(), ";"); return output.c_str(); } - else if (prop == "MACROS") - { - this->GetListOfMacros(output); - return output.c_str(); - } else if (prop == "INCLUDE_DIRECTORIES") { std::string sep; diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index e86aa3b..2fc4d78 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -655,12 +655,6 @@ public: */ cmSourceFile *GetSourceFileWithOutput(const std::string& outName) const; - /** - * Add a macro to the list of macros. The arguments should be name of the - * macro and a documentation signature of it - */ - void AddMacro(const char* name); - ///! Add a new cmTest to the list of tests for this makefile. cmTest* CreateTest(const std::string& testName); @@ -670,11 +664,6 @@ public: cmTest* GetTest(const std::string& testName) const; /** - * Get a list of macros as a ; separated string - */ - void GetListOfMacros(std::string& macros) const; - - /** * Return a location of a file in cmake or custom modules directory */ std::string GetModulesFile(const char* name) const; @@ -906,8 +895,6 @@ private: std::stack<int> LoopBlockCounter; - std::vector<std::string> MacrosList; - mutable cmsys::RegularExpression cmDefineRegex; mutable cmsys::RegularExpression cmDefine01Regex; mutable cmsys::RegularExpression cmAtVarRegex; |