[CMake] CHECK_INCLUDE_FILES

George Neill georgen at neillnet.com
Thu Jul 31 15:21:57 EDT 2008


Bill,

> I must be missing something (or there's a bug in CheckIncludeFiles.cmake)
>
> CHECK_INCLUDE_FILES(sys/types.h;netinet/tcp.h HAVE_NETINET_TCP_H)
> SET(HAVE_NETINET_TCP_H ${HAVE_NETINET_TCP_H} CACHE INTERNAL "netinet/tcp.h")
> .
> .
> .
> -- Looking for include files netinet/tcp.h
> -- Looking for include files netinet/tcp.h - found
> -- Looking for include files HAVE_SYS_SYSTEMINFO_H
> -- Looking for include files HAVE_SYS_SYSTEMINFO_H - found
>
> I have tried
>
> CHECK_INCLUDE_FILES(sys/types.h;netinet/tcp.h HAVE_NETINET_TCP_H)
>
> and
>
> LIST(APPEND NETINET sys/types.h netinet/tcp.h)
> CHECK_INCLUDE_FILES(${NETINET} HAVE_NETINET_TCP_H)
>
> and
>
> LIST(APPEND NETINET sys/types.h)
> LIST(APPEND NETINET netinet/tcp.h)
> CHECK_INCLUDE_FILES(${NETINET} HAVE_NETINET_TCP_H)
>
> all three of these provide the same results as above (I am using 2.4.8)

I am tempted to write a macro with an interface like this,

CHECK_INCLUDES( FILES sys/types.h netinet.h VARIABLE HAVE_NETINET_TCP_H)

I suspect that might be better (for me anyhow) ... Thoughts?   it
looks like the list passed in to check_include_files is getting
exploded in to three arguments.

TIA,
George.


More information about the CMake mailing list