Explorar o código

cmake: Fix --check-build-system argument count check (#14784)

This internal option requires two arguments, not just one.  Fix the
argument count required to recognize the option.
Brad King %!s(int64=12) %!d(string=hai) anos
pai
achega
3504f9b9ff
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Source/cmake.cxx

+ 1 - 1
Source/cmake.cxx

@@ -653,7 +653,7 @@ void cmake::SetArgs(const std::vector<std::string>& args,
       cmSystemTools::ConvertToUnixSlashes(path);
       cmSystemTools::ConvertToUnixSlashes(path);
       this->SetHomeOutputDirectory(path.c_str());
       this->SetHomeOutputDirectory(path.c_str());
       }
       }
-    else if((i < args.size()-1) && (arg.find("--check-build-system",0) == 0))
+    else if((i < args.size()-2) && (arg.find("--check-build-system",0) == 0))
       {
       {
       this->CheckBuildSystemArgument = args[++i];
       this->CheckBuildSystemArgument = args[++i];
       this->ClearBuildSystem = (atoi(args[++i].c_str()) > 0);
       this->ClearBuildSystem = (atoi(args[++i].c_str()) > 0);