[cmake-developers] Branches on next

Ben Boeckel ben.boeckel at kitware.com
Wed Feb 12 19:34:46 EST 2014


On Tue, Feb 11, 2014 at 19:16:49 -0500, Matthew Woehlke wrote:
> >If you're looking for corner-cases, check out the RunCMake.Syntax test
> >in the source tree. If you can handle that, you're probably doing pretty
> >well on the basics.
> 
> Thanks; I may do that some time.

Also look at RunCMake.variable_expansion (on next).

Speaking of corner cases, one evil case I thought up of is not as evil
as it could have been:

    set(0 TRUE)
    if (0)
        message("madness")
    else ()
        message("actually called")
    endif ()

This is however, is slightly evil:

    set(zero 00)
    if (zero)
        message("actually called")
    else ()
        message("well, it was a nice thought")
    endif ()
    if (${zero})
        message("wait a minute...")
    else ()
        message("actually called")
    endif ()

Not sure how if want to handle that with a policy or not.

--Ben



More information about the cmake-developers mailing list