summaryrefslogtreecommitdiff
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-10-17 11:43:15 -0400
committerDavid Cole <david.cole@kitware.com>2009-10-17 11:43:15 -0400
commit16d995d728a73b07751458333c401de5dbec2fc3 (patch)
tree614c7cff990775e3881c2cad425f0be201cfc22e /Source/cmFileCommand.cxx
parent772253ecc640a3e1eb423271b323ef68b2a04c6f (diff)
downloadcmake-16d995d728a73b07751458333c401de5dbec2fc3.tar.gz
Fixed issues with message text in FILE command error situations. Added many new test cases to increase the coverage of the FILE command even further.
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index abe6bc9f62..396ce05707 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2290,7 +2290,7 @@ bool cmFileCommand::HandleRelativePathCommand(
{
if(args.size() != 4 )
{
- this->SetError("called with incorrect number of arguments");
+ this->SetError("RELATIVE_PATH called with incorrect number of arguments");
return false;
}
@@ -2301,7 +2301,7 @@ bool cmFileCommand::HandleRelativePathCommand(
if(!cmSystemTools::FileIsFullPath(directoryName.c_str()))
{
std::string errstring =
- "RelativePath must be passed a full path to the directory: "
+ "RELATIVE_PATH must be passed a full path to the directory: "
+ directoryName;
this->SetError(errstring.c_str());
return false;
@@ -2309,7 +2309,7 @@ bool cmFileCommand::HandleRelativePathCommand(
if(!cmSystemTools::FileIsFullPath(fileName.c_str()))
{
std::string errstring =
- "RelativePath must be passed a full path to the file: "
+ "RELATIVE_PATH must be passed a full path to the file: "
+ fileName;
this->SetError(errstring.c_str());
return false;
@@ -2328,7 +2328,7 @@ bool cmFileCommand::HandleRename(std::vector<std::string> const& args)
{
if(args.size() != 3)
{
- this->SetError("given incorrect number of arguments.");
+ this->SetError("RENAME given incorrect number of arguments.");
return false;
}
@@ -2400,8 +2400,8 @@ bool cmFileCommand::HandleCMakePathCommand(std::vector<std::string>
std::vector<std::string>::const_iterator i = args.begin();
if(args.size() != 3)
{
- this->SetError("FILE(SYSTEM_PATH ENV result) must be called with "
- "only three arguments.");
+ this->SetError("FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be "
+ "called with exactly three arguments.");
return false;
}
i++; // Get rid of subcommand
@@ -2539,8 +2539,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
if(!cmSystemTools::FileExists(dir.c_str()) &&
!cmSystemTools::MakeDirectory(dir.c_str()))
{
- std::string errstring = "FILE(DOWNLOAD ) error; cannot create directory: "
- + dir + ". Maybe need administrative privileges.";
+ std::string errstring = "DOWNLOAD error: cannot create directory '"
+ + dir + "' - Specify file by full path name and verify that you "
+ "have directory creation and file write privileges.";
this->SetError(errstring.c_str());
return false;
}