summaryrefslogtreecommitdiffstats
path: root/Source/cmOptionCommand.cxx
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2018-06-18 14:40:36 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2018-06-21 15:18:16 (GMT)
commit5bb3d40a289c44f350aa68f32e5ef0c1ad7f13b1 (patch)
treec133e28685160a94e61c6d155b3910a17c77a4ca /Source/cmOptionCommand.cxx
parent6e7b424240dfae88a22327c86454150f2200b7c5 (diff)
downloadCMake-5bb3d40a289c44f350aa68f32e5ef0c1ad7f13b1.zip
CMake-5bb3d40a289c44f350aa68f32e5ef0c1ad7f13b1.tar.gz
CMake-5bb3d40a289c44f350aa68f32e5ef0c1ad7f13b1.tar.bz2
cmOption: Remove VTK 4.0 workarounds
CMake has no reason to have special logic to fix bad logic within VTK 4.0.
Diffstat (limited to 'Source/cmOptionCommand.cxx')
-rw-r--r--Source/cmOptionCommand.cxx14
1 files changed, 1 insertions, 13 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx
index 00a2d2b..13bcd03 100644
--- a/Source/cmOptionCommand.cxx
+++ b/Source/cmOptionCommand.cxx
@@ -14,19 +14,7 @@ class cmExecutionStatus;
bool cmOptionCommand::InitialPass(std::vector<std::string> 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, " ");