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/cmCTestConfigureCommand.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/cmCTestConfigureCommand.cxx')
-rw-r--r-- | Source/CTest/cmCTestConfigureCommand.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx index 1ad4e24..147173f 100644 --- a/Source/CTest/cmCTestConfigureCommand.cxx +++ b/Source/CTest/cmCTestConfigureCommand.cxx @@ -89,6 +89,16 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler() return 0; } + 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; |