Commit v3.4.0-rc1~494^2~4 (cmMakefile: Add API for elseif to create backtrace., 2015-05-29) removed the use of cmMakefileCall to push/pop execution context in favor of a new way to create backtraces. However, a call to cmMakefile::GetExecutionContext is still invoked to issue a contextual CMP0054 warning through cmConditionEvaluator. As the elseif is not part of the call stack, this resulted in trying to access an empty vector. Avoid the attempt at getting execution context when evaluating elseif by constructing a context and backtrace on behalf of the cmConditionEvaluator in all cases.
8 lines
201 B
CMake
8 lines
201 B
CMake
set(FOO "BAR")
|
|
|
|
if(NOT "FOO" STREQUAL "BAR")
|
|
message(FATAL_ERROR "The given literals should match")
|
|
elseif("FOO" STREQUAL "BING")
|
|
message(FATAL_ERROR "The given literals should not match")
|
|
endif()
|