From 523b7ffa3bbefcc78450d74734b44a222882c616 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Fri, 15 Nov 2002 13:17:43 -0500 Subject: fixed bad source directory bug --- Source/cmake.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 7807927..3e440fe 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -847,6 +847,16 @@ int cmake::Run(const std::vector& args) // 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"); + this->Usage(args[0].c_str()); + return -1; + } + // set the cmake command m_CMakeCommand = args[0]; -- cgit v0.12