[cmake-commits] king committed cmListCommand.cxx 1.15 1.16
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Jan 16 11:24:44 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv15225
Modified Files:
cmListCommand.cxx
Log Message:
ENH: Allow LIST(APPEND) command to append nothing.
Index: cmListCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmListCommand.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- cmListCommand.cxx 15 Aug 2007 14:26:50 -0000 1.15
+++ cmListCommand.cxx 16 Jan 2008 16:24:41 -0000 1.16
@@ -179,12 +179,18 @@
//----------------------------------------------------------------------------
bool cmListCommand::HandleAppendCommand(std::vector<std::string> const& args)
{
- if(args.size() < 3)
+ if(args.size() < 2)
{
- this->SetError("sub-command APPEND requires at least two arguments.");
+ this->SetError("sub-command APPEND requires at least one argument.");
return false;
}
+ // Skip if nothing to append.
+ if(args.size() < 3)
+ {
+ return true;
+ }
+
const std::string& listName = args[1];
// expand the variable
std::string listString;
More information about the Cmake-commits
mailing list