[CMake] When are these set: APPLE, etc *AND* documentation ERROR

Alexander Neundorf a.neundorf-work at gmx.net
Sat Jun 14 13:49:04 EDT 2008


On Saturday 14 June 2008, Miguel A. Figueroa-Villanueva wrote:
> Hello,
>
> I'm reviewing a few CMake variables used to determine the platform we
> are in. I'm looking at the "cmake --help-variable" output and at the
> wiki (http://www.cmake.org/Wiki/CMake_Useful_Variables).
>
> I found a discrepancy, which should be fixed. In the help output for
> APPLE it returns: True if running on Mac OSX. However, the wiki says
> that it will return TRUE for other APPLE (non-macosx) systems as well.

I don't know under which systems APPLE is true but it's not OSX.
Brandon put that in the wiki:
http://www.cmake.org/Wiki/index.php?title=CMake_Useful_Variables&diff=9126&oldid=9113
It must be some rare case, at least in KDE and I think also in all Kitware 
projects it is assumed that if it is APPLE, then it's also OSX.

> Also, are MINGW and MSYS variables "official"?; 

Yes. They are set by the makefile generators (grep in Source/ helps to find 
out :-) )

> there documentation is not available in the help.
>
> More to the point of my question, since I don't have a few of these
> platforms available, I would like to ask for help verifying the
> following assumptions:
>
> 1. UNIX is TRUE in msys systems, right?

I don't know. Under cygwin UNIX is true. I think this is the only environment 
under Windows where UNIX is true (but I'm not sure, can't test). A grep in 
Source/ leads to cmMakefile.cxx, and there UNIX is only set to true under 
Windows if it's built for cygwin.

> 2. UNIX is FALSE in mingw systems that do not have the msys shell
> installed, right?

Most probably, yes.

> 3. WIN32 is TRUE in both mingw and msys systems, right?

Yes, WIN32 is true under all Windows variants.

Alex


More information about the CMake mailing list