mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
cmOption: Remove VTK 4.0 workarounds
CMake has no reason to have special logic to fix bad logic within VTK 4.0.
This commit is contained in:
@@ -14,19 +14,7 @@ class cmExecutionStatus;
|
|||||||
bool cmOptionCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmOptionCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus&)
|
cmExecutionStatus&)
|
||||||
{
|
{
|
||||||
bool argError = false;
|
const bool argError = (args.size() < 2) || (args.size() > 3);
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (argError) {
|
if (argError) {
|
||||||
std::string m = "called with incorrect number of arguments: ";
|
std::string m = "called with incorrect number of arguments: ";
|
||||||
m += cmJoin(args, " ");
|
m += cmJoin(args, " ");
|
||||||
|
|||||||
Reference in New Issue
Block a user