[Cmake] cmake adding -I/usr/include/ finds wrong curses.h with g++/Solari s.

Wheeler, Fred (CRD) wheeler at crd.ge.com
Fri Feb 8 09:54:12 EST 2002


I updated my cmake source a few days ago and started having a problem
compiling cmake with gcc on Solaris 2.7.  The problem is with
curses.h.  Cmake looks for curses.h and finds it in /usr/include.
This causes "-I/usr/include/" to be added to the command line.
This option causes g++ to include /usr/include/curses.h directly
instead of including its own fixed version (created with fixincludes).

Is this a cmake bug?  Is there a fix or workaround?

In case anyone is interested, /usr/include/curses.h is broken in
Solaris 27 because of the following:

#if !(defined(__cplusplus) && defined(_BOOL))
typedef	char bool;
#endif

gcc fixes this to

#if !(defined(__cplusplus) && defined(_BOOL))
#ifndef __cplusplus
typedef char bool;
#endif
#endif

Thanks,
Fred Wheeler



More information about the CMake mailing list