From ab2dc5558b339a4969b9ff679d4f75a5f11618a0 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Mon, 5 Aug 2002 09:51:50 -0400 Subject: minor fix --- Source/cmRemoveCommand.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Source/cmRemoveCommand.cxx') diff --git a/Source/cmRemoveCommand.cxx b/Source/cmRemoveCommand.cxx index 982432b4d3..9973b60b79 100644 --- a/Source/cmRemoveCommand.cxx +++ b/Source/cmRemoveCommand.cxx @@ -19,10 +19,9 @@ // cmRemoveCommand bool cmRemoveCommand::InitialPass(std::vector const& args) { - if(args.size() < 2 ) + if(args.size() < 1) { - this->SetError("called with incorrect number of arguments"); - return false; + return true; } const char* variable = args[0].c_str(); // VAR is always first @@ -30,6 +29,12 @@ bool cmRemoveCommand::InitialPass(std::vector const& args) const char* cacheValue = m_Makefile->GetDefinition(variable); + // if there is no old value then return + if (!cacheValue) + { + return true; + } + // expand the variable std::vector varArgsExpanded; std::vector temp; -- cgit v1.2.1