diff options
author | Brad King <brad.king@kitware.com> | 2013-02-08 18:38:43 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-02-08 18:38:43 (GMT) |
commit | f4d1474013aeb51bdedbbd2493b4d7b337f444a6 (patch) | |
tree | 271dacdcecd89f70f43688167c62420294587005 /Source/ctest.cxx | |
parent | e8df4cab82914f061752bc3e6b9a8a6498b1485b (diff) | |
parent | a943b5c4f3ed700f53c554b9f91942ad57047c18 (diff) | |
download | CMake-f4d1474013aeb51bdedbbd2493b4d7b337f444a6.zip CMake-f4d1474013aeb51bdedbbd2493b4d7b337f444a6.tar.gz CMake-f4d1474013aeb51bdedbbd2493b4d7b337f444a6.tar.bz2 |
Merge topic 'exit-without-working-directory'
a943b5c Fail early if no current working directory exists
Diffstat (limited to 'Source/ctest.cxx')
-rw-r--r-- | Source/ctest.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/ctest.cxx b/Source/ctest.cxx index d650777..8de901a 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -273,14 +273,13 @@ int main (int argc, char *argv[]) return cmCTestLaunch::Main(argc, argv); } - int nocwd = 0; cmCTest inst; if ( cmSystemTools::GetCurrentWorkingDirectory().size() == 0 ) { cmCTestLog(&inst, ERROR_MESSAGE, "Current working directory cannot be established." << std::endl); - nocwd = 1; + return 1; } // If there is a testing input file, check for documentation options @@ -298,7 +297,7 @@ int main (int argc, char *argv[]) } cmDocumentation doc; doc.addCTestStandardDocSections(); - if(doc.CheckOptions(argc, argv) || nocwd) + if(doc.CheckOptions(argc, argv)) { // Construct and print requested documentation. std::vector<cmDocumentationEntry> commands; |