[CMake] Two questions

William A. Hoffman billlist at nycap.rr.com
Tue Aug 15 12:50:25 EDT 2006


At 03:21 PM 8/14/2006, Jorge Rodriguez wrote:
>2) Is there anything like:
>
>IF(WIN64)
>   MESSAGE("Win 64!")
>ENDIF(WIN64)
>
>I notice that on a 64 bit build machine with a 64 bit compiler, this does not print the message, but IF(WIN32) works fine. (Which is good, because I have alot of IF(WIN32)'s that I would like to work on win64 as well.) The only way I can tell if we are running a 64 bit build is by running 'cl' (the compiler) and parsing the output for 'for x64' instead of 'for 80x86'. Is there a better way to do this?
IF(CMAKE_CL_64)
  message("win64")
ENDIF(CMAKE_CL_64)



More information about the CMake mailing list