[CMake] Does CMake set preprocessor variables automatically?

Convey Christian J NPRI ConveyCJ at Npt.NUWC.Navy.Mil
Tue Jan 29 11:14:30 EST 2008


Does CMake automatically set preprocessor variables that indicate the operating system?

I'd like to write some code similar to this:

#ifdef UNIX
   ...
#elif WIN#@
   ...
#endif

But if CMake is already setting some of those preprocessor variables for me, it's not clear what variables it's setting.

Thanks,
Christian

Christian Convey
Scientist, Naval Undersea Warfare Centers
Newport, RI



More information about the CMake mailing list