diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-06 22:54:13 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-06 22:54:13 (GMT) |
commit | 96d561aabc7ca453396b8d419b3398dea6b13572 (patch) | |
tree | cfb721d465938dc9d7f5454854897414c8006bd7 /Source/cmMakefile.cxx | |
parent | 7d6aaf23e9c3d1ffe81c85791191658b797271f2 (diff) | |
download | CMake-96d561aabc7ca453396b8d419b3398dea6b13572.zip CMake-96d561aabc7ca453396b8d419b3398dea6b13572.tar.gz CMake-96d561aabc7ca453396b8d419b3398dea6b13572.tar.bz2 |
ENH: Add option to retrieve list of macros. Close Bug #25 - Get_CMAKE_PROPERTIES
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index f61f7bf..70ca89d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2003,6 +2003,31 @@ cmVariableWatch *cmMakefile::GetVariableWatch() const return 0; } +void cmMakefile::AddMacro(const char* name, const char* signature) +{ + if ( !name || !signature ) + { + return; + } + m_MacrosMap[name] = signature; +} + +void cmMakefile::GetListOfMacros(std::string& macros) +{ + StringStringMap::iterator it; + macros = ""; + int cc; + for ( it = m_MacrosMap.begin(); it != m_MacrosMap.end(); ++it ) + { + if ( cc > 0 ) + { + macros += ";"; + } + macros += it->first; + cc ++; + } +} + cmCacheManager *cmMakefile::GetCacheManager() const { return this->GetCMakeInstance()->GetCacheManager(); |