[cmake-commits] alex committed cmSetPropertiesCommand.h 1.4 1.5
cmake.cxx 1.313 1.314 cmake.h 1.87 1.88
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Jul 27 09:00:01 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv13797/Source
Modified Files:
cmSetPropertiesCommand.h cmake.cxx cmake.h
Log Message:
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
Index: cmake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.h,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- cmake.h 20 Jul 2007 12:36:16 -0000 1.87
+++ cmake.h 27 Jul 2007 12:59:58 -0000 1.88
@@ -197,6 +197,7 @@
void AddCommand(cmCommand* );
void RenameCommand(const char* oldName, const char* newName);
void RemoveCommand(const char* name);
+ void RemoveUnscriptableCommands();
/**
* Get a command by its name
Index: cmSetPropertiesCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSetPropertiesCommand.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cmSetPropertiesCommand.h 26 Jun 2007 17:50:14 -0000 1.4
+++ cmSetPropertiesCommand.h 27 Jul 2007 12:59:58 -0000 1.5
@@ -60,7 +60,12 @@
"or TEST test_name."
;
}
-
+
+ /**
+ * This determines if the command is invoked when in script mode.
+ */
+ virtual bool IsScriptable() { return true; }
+
cmTypeMacro(cmSetPropertiesCommand, cmCommand);
};
Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.313
retrieving revision 1.314
diff -u -d -r1.313 -r1.314
--- cmake.cxx 25 Jul 2007 14:57:33 -0000 1.313
+++ cmake.cxx 27 Jul 2007 12:59:58 -0000 1.314
@@ -290,6 +290,29 @@
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)
{
More information about the Cmake-commits
mailing list