summaryrefslogtreecommitdiffstats
path: root/Source/cmSetCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-06-04 22:23:58 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-06-04 22:23:58 (GMT)
commitc57d16eb414345bf62545686efaf4a4ff91ba686 (patch)
tree65667a1cad7f95cafaef5e10442315b7e1e82670 /Source/cmSetCommand.cxx
parent815ca6bbdcbd971d0e8b9b94eb3c8138b6280fa2 (diff)
downloadCMake-c57d16eb414345bf62545686efaf4a4ff91ba686.zip
CMake-c57d16eb414345bf62545686efaf4a4ff91ba686.tar.gz
CMake-c57d16eb414345bf62545686efaf4a4ff91ba686.tar.bz2
ENH: add better error checking
Diffstat (limited to 'Source/cmSetCommand.cxx')
-rw-r--r--Source/cmSetCommand.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx
index 576cae9..54242ce 100644
--- a/Source/cmSetCommand.cxx
+++ b/Source/cmSetCommand.cxx
@@ -84,6 +84,21 @@ bool cmSetCommand::Invoke(std::vector<std::string>& args)
value = args[1];
cacheStart = 2;
}
+ else
+ {
+ std::string message;
+ message += "Syntax error in SET:\n";
+ message += "CACHE requires TYPE and document string SET command:\n";
+ message += "SET (";
+ for(std::vector<std::string>::iterator i = args.begin();
+ i != args.end(); ++i)
+ {
+ message += *i;
+ }
+ message += ")\n";
+ this->SetError(message.c_str());
+ return false;
+ }
if(cache)
{
if(args[cacheStart] != "CACHE")