diff options
author | David Cole <david.cole@kitware.com> | 2009-12-29 23:03:45 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2009-12-29 23:03:45 (GMT) |
commit | b0d5fa0bc71e60dfba8907cb6bc52a10567eaf1d (patch) | |
tree | 8463b14b228a1fb977e6f2ca16eb25acc6ccdfd2 /Source/CTest/cmCTestBuildCommand.cxx | |
parent | 47bd8637abbfe4d4246cdb3316ef96da98ec4b08 (diff) | |
download | CMake-b0d5fa0bc71e60dfba8907cb6bc52a10567eaf1d.zip CMake-b0d5fa0bc71e60dfba8907cb6bc52a10567eaf1d.tar.gz CMake-b0d5fa0bc71e60dfba8907cb6bc52a10567eaf1d.tar.bz2 |
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.
Diffstat (limited to 'Source/CTest/cmCTestBuildCommand.cxx')
-rw-r--r-- | Source/CTest/cmCTestBuildCommand.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx index 7a4d877..b984e85 100644 --- a/Source/CTest/cmCTestBuildCommand.cxx +++ b/Source/CTest/cmCTestBuildCommand.cxx @@ -144,10 +144,17 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler() else { 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."; + 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; } |