diff options
author | Ken Martin <ken.martin@kitware.com> | 2002-11-15 18:17:43 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2002-11-15 18:17:43 (GMT) |
commit | 523b7ffa3bbefcc78450d74734b44a222882c616 (patch) | |
tree | 4792dc60df5e4c9994694fae8e244e1aabb3f5e7 /Source/cmake.cxx | |
parent | 78b8d0af6c56f5d363d68b4151a6d321a66406e5 (diff) | |
download | CMake-523b7ffa3bbefcc78450d74734b44a222882c616.zip CMake-523b7ffa3bbefcc78450d74734b44a222882c616.tar.gz CMake-523b7ffa3bbefcc78450d74734b44a222882c616.tar.bz2 |
fixed bad source directory bug
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
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<std::string>& 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]; |