[CMake] Complaint about if..endif

Philip Lowman philip at yhbt.com
Sat Nov 22 00:53:00 EST 2008


On Sat, Nov 22, 2008 at 12:17 AM, Robert Dailey <rcdailey at gmail.com> wrote:

> Hi,
>
> Why must endif() contain the same expression as the associated if()
> command? Isn't CMake smart enough to know that a simple occurrence of
> "endif()" simply matches the previous if(), regardless of its expression
> list? Are there any plans to simplify this? The way it is now is redundant
> and boilerplate.


On CMake 2.6.x you no longer have to match the endif().  If you're still
using CMake 2.4.x you can set CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS.

http://www.vtk.org/Wiki/CMake_Useful_Variables


-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081122/38455484/attachment.htm>


More information about the CMake mailing list