[Cmake-commits] [cmake-commits] david.cole committed cmFileCommand.cxx 1.140 1.141

cmake-commits at cmake.org cmake-commits at cmake.org
Sat Oct 17 11:43:17 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv12408/Source

Modified Files:
	cmFileCommand.cxx 
Log Message:
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.


Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.140
retrieving revision 1.141
diff -C 2 -d -r1.140 -r1.141
*** cmFileCommand.cxx	6 Oct 2009 21:51:34 -0000	1.140
--- cmFileCommand.cxx	17 Oct 2009 15:43:15 -0000	1.141
***************
*** 2291,2295 ****
    if(args.size() != 4 )
      {
!     this->SetError("called with incorrect number of arguments");
      return false;
      }
--- 2291,2295 ----
    if(args.size() != 4 )
      {
!     this->SetError("RELATIVE_PATH called with incorrect number of arguments");
      return false;
      }
***************
*** 2302,2306 ****
      {
      std::string errstring =
!       "RelativePath must be passed a full path to the directory: "
        + directoryName;
      this->SetError(errstring.c_str());
--- 2302,2306 ----
      {
      std::string errstring =
!       "RELATIVE_PATH must be passed a full path to the directory: "
        + directoryName;
      this->SetError(errstring.c_str());
***************
*** 2310,2314 ****
      {
      std::string errstring =
!       "RelativePath must be passed a full path to the file: "
        + fileName;
      this->SetError(errstring.c_str());
--- 2310,2314 ----
      {
      std::string errstring =
!       "RELATIVE_PATH must be passed a full path to the file: "
        + fileName;
      this->SetError(errstring.c_str());
***************
*** 2329,2333 ****
    if(args.size() != 3)
      {
!     this->SetError("given incorrect number of arguments.");
      return false;
      }
--- 2329,2333 ----
    if(args.size() != 3)
      {
!     this->SetError("RENAME given incorrect number of arguments.");
      return false;
      }
***************
*** 2401,2406 ****
    if(args.size() != 3)
      {
!     this->SetError("FILE(SYSTEM_PATH ENV result) must be called with "
!                    "only three arguments.");
      return false;
      }
--- 2401,2406 ----
    if(args.size() != 3)
      {
!     this->SetError("FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be "
!       "called with exactly three arguments.");
      return false;
      }
***************
*** 2540,2545 ****
       !cmSystemTools::MakeDirectory(dir.c_str()))
      {
!     std::string errstring = "FILE(DOWNLOAD ) error; cannot create directory: "
!       + dir + ". Maybe need administrative privileges.";
      this->SetError(errstring.c_str());
      return false;
--- 2540,2546 ----
       !cmSystemTools::MakeDirectory(dir.c_str()))
      {
!     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;



More information about the Cmake-commits mailing list