[cmake-commits] alex committed cmake.cxx 1.296 1.297 cmake.h 1.80 1.81
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Jun 12 10:56:42 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv7458
Modified Files:
cmake.cxx cmake.h
Log Message:
ENH: remove non/scriptable cmake commands from the script handler in ctest,
as discussed with David. This also gives a better ctest man page with just
the commands you should actually use in ctest scripts.
Until now these commands were more or less executed, but e.g. add_executable() didn't create an executable, project() failed with an
error. Now you get an error instantly if using one of these commands.
Alex
Index: cmake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.h,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- cmake.h 8 Jun 2007 15:57:16 -0000 1.80
+++ cmake.h 12 Jun 2007 14:56:39 -0000 1.81
@@ -193,6 +193,7 @@
*/
void AddCommand(cmCommand* );
void RenameCommand(const char* oldName, const char* newName);
+ void RemoveCommand(const char* name);
/**
* Get a command by its name
Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.296
retrieving revision 1.297
diff -u -d -r1.296 -r1.297
--- cmake.cxx 8 Jun 2007 15:57:16 -0000 1.296
+++ cmake.cxx 12 Jun 2007 14:56:39 -0000 1.297
@@ -260,6 +260,17 @@
this->Commands.erase(pos);
}
+void cmake::RemoveCommand(const char* name)
+{
+ std::string sName = cmSystemTools::LowerCase(name);
+ RegisteredCommandsMap::iterator pos = this->Commands.find(sName);
+ if ( pos != this->Commands.end() )
+ {
+ delete pos->second;
+ this->Commands.erase(pos);
+ }
+}
+
void cmake::AddCommand(cmCommand* wg)
{
std::string name = cmSystemTools::LowerCase(wg->GetName());
More information about the Cmake-commits
mailing list