diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-06-04 22:23:58 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-06-04 22:23:58 (GMT) |
commit | c57d16eb414345bf62545686efaf4a4ff91ba686 (patch) | |
tree | 65667a1cad7f95cafaef5e10442315b7e1e82670 /Source/cmSetCommand.cxx | |
parent | 815ca6bbdcbd971d0e8b9b94eb3c8138b6280fa2 (diff) | |
download | CMake-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.cxx | 15 |
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") |