diff options
author | Brad King <brad.king@kitware.com> | 2003-06-13 18:15:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-06-13 18:15:17 (GMT) |
commit | abffd72cbb5753e11ca7a44e837e9d02f704fb21 (patch) | |
tree | 9d79ed2940bb3218cf2e64c5d9eb1651a57959b8 | |
parent | 2d411398fdf99bd97a68060b8c1f72b7a128acf6 (diff) | |
download | CMake-abffd72cbb5753e11ca7a44e837e9d02f704fb21.zip CMake-abffd72cbb5753e11ca7a44e837e9d02f704fb21.tar.gz CMake-abffd72cbb5753e11ca7a44e837e9d02f704fb21.tar.bz2 |
BUG: Fixed check for existence of CMakeLists.txt file in top-level source directory before first configure.
-rw-r--r-- | Source/cmake.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 9ddbb7a..22e747f 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -786,6 +786,17 @@ void cmake::SetGlobalGenerator(cmGlobalGenerator *gg) int cmake::DoPreConfigureChecks() { + // Make sure the Start directory contains a CMakeLists.txt file. + std::string srcList = this->GetHomeDirectory(); + srcList += "/CMakeLists.txt"; + if(!cmSystemTools::FileExists(srcList.c_str())) + { + cmSystemTools::Error( + "The source directory does not appear to contain CMakeLists.txt.\n" + "Specify --help for usage."); + return -2; + } + // do a sanity check on some values if(m_CacheManager->GetCacheValue("CMAKE_HOME_DIRECTORY")) { @@ -955,17 +966,6 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure) // Process the arguments this->SetArgs(args); - // make sure rthe Start directory contains a CMakeLists.txt file - std::string srcList = this->GetHomeDirectory(); - srcList += "/CMakeLists.txt"; - if(!cmSystemTools::FileExists(srcList.c_str())) - { - cmSystemTools::Error( - "The source directory does not appear to contain CMakeLists.txt.\n" - "Specify --help for usage."); - return -1; - } - // set the cmake command m_CMakeCommand = args[0]; |