Hi,

I have a few projects that have to check for net/if.h. At least on Mac OS X the fails with CHECK_INCLUDE_FILES() even if the file exists as it needs some types that are imported through
sys/socket.h.

Looking at the template of Modules/CheckIncludeFile.c.in I see:

  #include <${CHECK_INCLUDE_FILE_VAR}>

and no way to add other includes before that.

Right now I use a multi-line hack to get sys/socket.h in, but I think there should be a easier
way to handle this:

## multi-line hack to get sys/socket.h included before net/if.h on MacOS X
  CHECK_INCLUDE_FILES("sys/socket.h>
  #include <net/if.h"  HAVE_NET_IF_H)

get expanded correctly and passes, but doesn't look "right".

Jan
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to