Browse Source

BUG: these flags do not take arguments, so they do not really need to check if they are last. Fixes Bug #1020 - ctest doesn't parse its options correctly

Andy Cedilnik 21 years ago
parent
commit
1f203c2868
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Source/cmCTest.cxx

+ 3 - 3
Source/cmCTest.cxx

@@ -4609,7 +4609,7 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
       i++;
       m_BuildTarget = args[i];
       }
-    if(arg.find("--build-nocmake",0) == 0 && i < args.size() - 1)
+    if(arg.find("--build-nocmake",0) == 0)
       {
       m_BuildNoCMake = true;
       }
@@ -4618,7 +4618,7 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
       i++;
       m_BuildRunDir = args[i];
       }
-    if(arg.find("--build-two-config",0) == 0 && i < args.size() - 1)
+    if(arg.find("--build-two-config",0) == 0)
       {
       m_BuildTwoConfig = true;
       }
@@ -4642,7 +4642,7 @@ int cmCTest::Run(std::vector<std::string>const& args, std::string* output)
       i++;
       m_BuildMakeProgram = args[i];
       }
-    if(arg.find("--build-noclean",0) == 0 && i < args.size() - 1)
+    if(arg.find("--build-noclean",0) == 0)
       {
       m_BuildNoClean = true;
       }