[CMake] FreeBSD compile thinks its __APPLE_ in #ifdefs

Tim Sutton tim at linfiniti.com
Thu Mar 22 12:57:02 EST 2007


Hi

Im  trying to help someone compile our software with cmake on FreeBSD.
ccmake runs fine but during compile the following error occurs:

#
In file included from
/home/psilotum/share/projects/libopenmodeller/openmodeller/src/openmodeller/Sample.cpp:5:
#
/usr/include/malloc.h:3:2: #error "<malloc.h> has been replaced by <stdlib.h>"

The code in question looks like this:

4 #ifdef __APPLE__
5 #include <malloc.h>
6 #endif

So cmake has decided its an APPLE machine and is incorrectly entering
this ifdef. Can any one point me to some notes on making things behave
correctly on FreeBSD?

Many thanks

Regards

-- 
-- 
Tim Sutton

Visit http://qgis.org for a great Open Source GIS
Home Page: http://linfiniti.com
Skype: timlinux
MSN: tim_bdworld at msn.com
Yahoo: tim_bdworld at yahoo.com
Jabber: timlinux
Irc: timlinux on #qgis at freenode.net


More information about the CMake mailing list