From 5bb3d40a289c44f350aa68f32e5ef0c1ad7f13b1 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 18 Jun 2018 10:40:36 -0400 Subject: [PATCH] cmOption: Remove VTK 4.0 workarounds CMake has no reason to have special logic to fix bad logic within VTK 4.0. --- Source/cmOptionCommand.cxx | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index 00a2d2bce9..13bcd03435 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -14,19 +14,7 @@ class cmExecutionStatus; bool cmOptionCommand::InitialPass(std::vector const& args, cmExecutionStatus&) { - bool argError = false; - if (args.size() < 2) { - argError = true; - } - // for VTK 4.0 we have to support the option command with more than 3 - // arguments if CMAKE_MINIMUM_REQUIRED_VERSION is not defined, if - // CMAKE_MINIMUM_REQUIRED_VERSION is defined, then we can have stricter - // checking. - if (this->Makefile->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION")) { - if (args.size() > 3) { - argError = true; - } - } + const bool argError = (args.size() < 2) || (args.size() > 3); if (argError) { std::string m = "called with incorrect number of arguments: "; m += cmJoin(args, " ");