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

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Sat Jun 14 17:37:38 EDT 2008


Hello Alex,

On Sat, Jun 14, 2008 at 1:49 PM, Alexander Neundorf wrote:
> On Saturday 14 June 2008, Miguel A. Figueroa-Villanueva wrote:
>> 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.

Well, doing some googling didn't turn up anything very concrete, but
it seems to be set only for Darwin systems... This should be deleted
from the wiki since it is misleading. That, or someone knowing a bit
more should clarify in what cases it is TRUE on non-osx.

>> Also, are MINGW and MSYS variables "official"?;
>
> Yes. They are set by the makefile generators (grep in Source/ helps to find
> out :-) )

Yep, I guess I forgot all about grep ;)

>> 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.

Yes, I know that for cygwin all of these are set: WIN32, UNIX, and
CYGWIN. Doing the grep thing leads me to believe that in msys, UNIX is
not set... maybe it should be?? I guess it is not an issue if nobody
has complained about it...

>> 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.

Ok, thanks again Alex.

--Miguel


More information about the CMake mailing list