[Cmake-commits] [cmake-commits] david.cole committed cmCTestBuildCommand.cxx 1.23 1.24 cmCTestConfigureCommand.cxx 1.14 1.15

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Dec 29 18:03:47 EST 2009


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

Modified Files:
	cmCTestBuildCommand.cxx cmCTestConfigureCommand.cxx 
Log Message:
Fix for issue #5041 - improve error messages that may occur during ctest_build and ctest_configure.

The improved text gives very clear information when either the CMakeLists.txt or CTestConfig.cmake file is missing. Hopefully, it makes it easier for those poor future souls who encounter these messages to solve their problems quickly.


Index: cmCTestConfigureCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestConfigureCommand.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -C 2 -d -r1.14 -r1.15
*** cmCTestConfigureCommand.cxx	4 Dec 2009 17:08:57 -0000	1.14
--- cmCTestConfigureCommand.cxx	29 Dec 2009 23:03:45 -0000	1.15
***************
*** 90,93 ****
--- 90,103 ----
          }
  
+       const std::string cmakelists_file = source_dir + "/CMakeLists.txt";
+       if ( !cmSystemTools::FileExists(cmakelists_file.c_str()) )
+         {
+         cmOStringStream e;
+         e << "CMakeLists.txt file does not exist ["
+           << cmakelists_file << "]";
+         this->SetError(e.str().c_str());
+         return 0;
+         }
+ 
        bool multiConfig = false;
        bool cmakeBuildTypeInOptions = false;

Index: cmCTestBuildCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestBuildCommand.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -C 2 -d -r1.23 -r1.24
*** cmCTestBuildCommand.cxx	4 Dec 2009 17:08:57 -0000	1.23
--- cmCTestBuildCommand.cxx	29 Dec 2009 23:03:45 -0000	1.24
***************
*** 145,152 ****
        {
        cmOStringStream ostr;
!       ostr << "CTEST_BUILD_COMMAND or CTEST_CMAKE_GENERATOR not specified. "
!         "Please specify the CTEST_CMAKE_GENERATOR and CTEST_PROJECT_NAME if "
!         "this is a CMake project, or specify the CTEST_BUILD_COMMAND for "
!         "cmake or any other project.";
        this->SetError(ostr.str().c_str());
        return 0;
--- 145,159 ----
        {
        cmOStringStream ostr;
!       ostr << "has no project to build. If this is a "
!         "\"built with CMake\" project, verify that CTEST_CMAKE_GENERATOR "
!         "and CTEST_PROJECT_NAME are set."
!         "\n"
!         "CTEST_PROJECT_NAME is usually set in CTestConfig.cmake. Verify "
!         "that CTestConfig.cmake exists, or CTEST_PROJECT_NAME "
!         "is set in the script, or PROJECT_NAME is passed as an argument "
!         "to ctest_build."
!         "\n"
!         "Alternatively, set CTEST_BUILD_COMMAND to build the project "
!         "with a custom command line.";
        this->SetError(ostr.str().c_str());
        return 0;



More information about the Cmake-commits mailing list