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

Mike Jackson imikejackson at gmail.com
Sat Jun 14 18:28:10 EDT 2008


On Jun 14, 2008, at 5:37 PM, Miguel A. Figueroa-Villanueva wrote:

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

Just remember that Darwin is the "unix" portion of OS X and is  
OpenSource. So someone could/can actually build a "Darwin" system  
that just runs X-Windows instead of Quartz as the window manager.

If you are building something for OS X then looking for "APPLE" as a  
test is probably safest. If your code could be built without ANY  
dependancies on ANYTHING from Apple thing you could probably just  
check for Darwin.

Of course I may be completely wrong... The kitware guys could answer  
definitively.

Mike



More information about the CMake mailing list