Awesome! Thanks. I wonder why it's not in CMake's online docs.
> -----Original Message----- > From: Mike Jackson [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 29, 2008 11:29 AM > To: Convey Christian J NPRI > Cc: [email protected] > Subject: Re: [CMake] Does CMake set preprocessor variables > automatically? > > I would take a look at: > > http://predef.sourceforge.net/precomp.html > > and use those. If _I_ were to do it I would do the following: > > If I were targeting specifically windows (MSVC, MINGW, CygWin) > > #if __WIN32 > > #else > > #endif > > > OR if I was targeting Visual studio then > > #if _MSC_VER > > #else > > #endif > > > Hope that helps. > mike > > On Jan 29, 2008, at 11:14 AM, Convey Christian J NPRI wrote: > > > 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 > > > > > _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
