From 3504f9b9ff8d76739f39af2bd2de8b6068431c2e Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 4 Mar 2014 10:11:32 -0500 Subject: [PATCH] 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. --- Source/cmake.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 33fb0fcde..abbabe762 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -653,7 +653,7 @@ void cmake::SetArgs(const std::vector& args, cmSystemTools::ConvertToUnixSlashes(path); 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->ClearBuildSystem = (atoi(args[++i].c_str()) > 0);