[CMake] CHECK_INCLUDE_FILES

George Neill georgen at neillnet.com
Thu Jul 31 10:31:48 EDT 2008


Hi All,

I have ran into a problem on Solaris (v10/SS12) with
CHECK_INCLUDE_FILES.  I believe this is actually a bug in the header
file I am checking for but none-the-less it's a problem for me.  I am
using cmake 2.4.8.

CHECK_INCLUDE_FILES(netinet/tcp.h HAVE_NETINET_TCP_H)

here's a quick test program i wrote to mock up what
CHECK_INCLUDE_FILES() is doing ...

-bash-3.00$ cat test.c
#include <netinet/tcp.h>

int main()
{
return 0;
}

Here's the compiler results,

-bash-3.00$ cc test.c
"/usr/include/netinet/tcp.h", line 40: syntax error before or at: uint_t
cc: acomp failed for test.c


It's obvious to me the netinet/tcp.h header file should have included
sys/types.h

My question is, is there a way to solve this without creating my own
check_include_files macro()?


More information about the CMake mailing list