diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index c094cdd7d..5c6c632d4 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -153,6 +153,13 @@ bool cmIfCommand::IsTrue(const std::vector &args, const char *def; const char *def2; + // handle empty invocation + if (args.size() < 1) + { + isValid = true; + return false; + } + // store the reduced args in this vector std::deque newArgs; int reducible = 1;