Imported Upstream version 2.8.11.2
[platform/upstream/cmake.git] / Source / ctest.cxx
index d650777..3e63183 100644 (file)
@@ -187,6 +187,7 @@ static const char * cmDocumentationOptions[][3] =
   {"--build-two-config", "Run CMake twice", "" },
   {"--build-exe-dir", "Specify the directory for the executable.", "" },
   {"--build-generator", "Specify the generator to use.", "" },
+  {"--build-generator-toolset", "Specify the generator-specific toolset.",""},
   {"--build-project", "Specify the name of the project to build.", "" },
   {"--build-makeprogram", "Specify the make program to use.", "" },
   {"--build-noclean", "Skip the make clean step.", "" },
@@ -273,14 +274,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 +298,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;