Command elsif does not yield an error.
Please consider this CMakeLists.txt
:
cmake_minimum_required(VERSION 3.8)
option(TEST_ELSIF "Test elsif" OFF)
if(TEST_ELSIF)
message(STATUS "TEST_ELSIF = ON")
elsif(NOT TEST_ELSIF)
message(STATUS "TEST_ELSIF = OFF")
endif()
The TEST_ELSIF = OFF
is never displayed, because of the typo (elsif
instead of elseif
).
CMake does not complain that the command is erroneous.
Tried with cmake-3.8.20170514-g5ae522
on Debian Jessie.