summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestConfigureCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestConfigureCommand.cxx')
-rw-r--r--Source/CTest/cmCTestConfigureCommand.cxx10
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;