summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/ctest.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index b8f5b9c..2639900 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -143,6 +143,15 @@ void ctest::ProcessDirectory(int &passed, int &failed)
// find the test executable
std::string testCommand =
cmSystemTools::EscapeSpaces(this->FindExecutable(args[1].c_str()).c_str());
+
+ // continue if we did not find the executable
+ if (testCommand == "")
+ {
+ std::cerr << "Unable to find executable: " <<
+ args[1].c_str() << "\n";
+ continue;
+ }
+
// add the arguments
std::vector<std::string>::iterator j = args.begin();
++j;