Please excuse the brainfart. I assume the true answer is that CMake doesn't set any preprocessor variables on its own. CMake just sets certain CMake variables, and if you want them reflected as preprocessor variables, you write the CMake calls to achieve that.
- C > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > On Behalf Of Convey Christian J NPRI > Sent: Tuesday, January 29, 2008 12:03 PM > To: [email protected] > Subject: RE: [CMake] Does CMake set preprocessor variables > automatically? > > 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 > _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
