[CMake] Operating system decisions

Tyler Roscoe tyler at cryptio.net
Thu Aug 6 15:55:18 EDT 2009


On Thu, Aug 06, 2009 at 12:42:44PM -0700, ML wrote:
> Thanks Tyler, is this avail in 2.6 (WINDOWS rather than using WIN32)  
> or in a future release?

It's available if you are working with CMake at my company :). Otherwise
you can do it yourself easily:

    # We want to use WINDOWS instead of the CMake-provided variable
    # WIN32 to prevent confusion about whether WIN32 applies to 64-bit
    # Windows (it does, but that's not obvious). 
    if (WIN32)
        set (WINDOWS ${WIN32})
    endif ()

I mentioned it because I was sort of passively hoping that one of the
CMake devs would see it and say, "hey, that's a good idea," and
eventually include it in CMake proper. Until then, I have my
CommonIncludes.cmake :).

tyler


More information about the CMake mailing list