Am 05.02.2015 um 21:12 schrieb Alexander Koeppe: > > Hi Cmake user list, > > I have a problem that I need to check the presence of a certain symbol > in a header file using CHECK_SYMBOL_EXISTS which has several dependencies. > > The check fails because the header file also contains data types that > require an additional header file to be included by the test program. It > looks like CHECK_SYMBOL_EXISTS is not capable doing that.
Fortunately a friend of mine, Gianfranco Constamagna gave me a tip which led me to the solution to my problem. The link where to find the solution: http://stackoverflow.com/questions/13611847/how-to-check-for-a-symbol-that-requires-two-header-files-in-cmake Acutally the following code check_symbol_exists( IP6T_SO_ORIGINAL_DST "netinet/in.h;net/if.h;linux/netfilter_ipv6/ip6_tables.h" HAVE_IP6T_SO_ORIGINAL_DST ) did the trick and transformed the semicolon seperated list of header files to #include <netinet/in.h> #include <net/if.h> #include <linux/netfilter_ipv6/ip6_tables.h> in the test C-file. With these headers the C testfile was compiled successfully and determined the availability of the #define variable. I answer to my own thread to document the solution to this problem on the place where I intentionly searched for in the 2nd instance. Maybe it helps somebody else who face the same problem. Greetings Alex -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
