diff options
author | Ken Martin <ken.martin@kitware.com> | 2001-11-26 16:31:50 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2001-11-26 16:31:50 (GMT) |
commit | 03e7f324f0a4e0e6cd249039b7bec4db1497ea60 (patch) | |
tree | f18ec2ce719679a32734ba66253a7c89b14a823c /Source/cmIfCommand.cxx | |
parent | c9b6e9f5f803ed7b54881e9c71749e9237f1ec32 (diff) | |
download | CMake-03e7f324f0a4e0e6cd249039b7bec4db1497ea60.zip CMake-03e7f324f0a4e0e6cd249039b7bec4db1497ea60.tar.gz CMake-03e7f324f0a4e0e6cd249039b7bec4db1497ea60.tar.bz2 |
better error messages
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r-- | Source/cmIfCommand.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index 703f9e3..157531b 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -65,8 +65,16 @@ ShouldRemove(const char *name, const std::vector<std::string> &args, void cmIfFunctionBlocker:: ScopeEnded(cmMakefile &mf) { - cmSystemTools::Error("The end of a CMakeLists file was reached with an IF statement that was not closed properly. Within the directory: ", - mf.GetCurrentDirectory()); + std::string errmsg = "The end of a CMakeLists file was reached with an IF statement that was not closed properly.\nWithin the directory: "; + errmsg += mf.GetCurrentDirectory(); + errmsg += "\nThe arguments are: "; + for(std::vector<std::string>::const_iterator j = m_Args.begin(); + j != m_Args.end(); ++j) + { + errmsg += *j; + errmsg += " "; + } + cmSystemTools::Error(errmsg.c_str()); } bool cmIfCommand::InitialPass(std::vector<std::string> const& args) |