mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
Help: Fix elseif/endif typo
In CMake 3.13.x, we had this evaluation for if() conditions:
if(a) elseif(b) else(a) endif(a)
The sensible intention of the change in commit c2efb3efcd (Help: Revise
docs on Scripting Commands, 2018-10-16, v3.14.0-rc1~505^2) was:
> "endif", "endfunction" etc: Explain that the argument is optional and
> maintained for compatibility only
Instead of "endif", it ended up being written to the documentation as
"elseif" by the commit author (oops) to if()'s page.
if(a) elseif(a!?) else() endif(a?)
Truthfully, endif()'s parameter should be an optional verbatim repeat
and not elseif()'s. If it wasn't, elseif() would be described to be the
same as if(). The rightful intended description is:
if(a) elseif(b) else() endif()
Fix that typo.
This commit is contained in:
committed by
Brad King
parent
6f23321d40
commit
572b4fd85b
@@ -23,7 +23,7 @@ Otherwise, optional ``elseif`` blocks are processed in the same way.
|
||||
Finally, if no ``condition`` is true, ``commands`` in the optional ``else``
|
||||
block are executed.
|
||||
|
||||
Per legacy, the :command:`else` and :command:`elseif` commands admit
|
||||
Per legacy, the :command:`else` and :command:`endif` commands admit
|
||||
an optional ``<condition>`` argument.
|
||||
If used, it must be a verbatim
|
||||
repeat of the argument of the opening
|
||||
|
||||
Reference in New Issue
Block a user