summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-27 12:59:59 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-27 12:59:59 (GMT)
commitd6a0c330bc2087eb5007d4b6b056e573220dc590 (patch)
tree1413695a25b3348b79d3541c22029fb7b80bc3a3 /Source/cmake.cxx
parente2aeecc29440b906fad3d8964b169b62cdfef188 (diff)
downloadCMake-d6a0c330bc2087eb5007d4b6b056e573220dc590.zip
CMake-d6a0c330bc2087eb5007d4b6b056e573220dc590.tar.gz
CMake-d6a0c330bc2087eb5007d4b6b056e573220dc590.tar.bz2
ENH: deb generator can now generate deb packages
-remove the unscriptable commands also from the cpack cmake -use CPACK_PACKAGE_CONTACT in CMakeCPack.cmake, it's used in the nsis and the deb generator -make set_properties() scriptable -use a non-const char array for adding the python modules Alex
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index c8d5fde..ea1e8b7 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -290,6 +290,29 @@ void cmake::AddCommand(cmCommand* wg)
this->Commands.insert( RegisteredCommandsMap::value_type(name, wg));
}
+
+void cmake::RemoveUnscriptableCommands()
+{
+ std::vector<std::string> unscriptableCommands;
+ cmake::RegisteredCommandsMap* commands = this->GetCommands();
+ for (cmake::RegisteredCommandsMap::const_iterator pos = commands->begin();
+ pos != commands->end();
+ ++pos)
+ {
+ if (!pos->second->IsScriptable())
+ {
+ unscriptableCommands.push_back(pos->first);
+ }
+ }
+
+ for(std::vector<std::string>::const_iterator it=unscriptableCommands.begin();
+ it != unscriptableCommands.end();
+ ++it)
+ {
+ this->RemoveCommand(it->c_str());
+ }
+}
+
// Parse the args
bool cmake::SetCacheArgs(const std::vector<std::string>& args)
{