There are two big issues with the check_function_exists() module that I've run into, and that others have also encountered:
(1) It can't detect functions that are inlined in system headers or specified as a #define macro. (see https://cmake.org/pipermail/cmake-developers/2015-July/025766.html) (2) For 32-bit Windows builds, it can't link against functions declared with a different calling convention than __cdecl. Since the Win32 API uses __stdcall, check_function_exists can't detect anything from libraries like kernel.lib or ws2_32.lib. (see https://cmake.org/pipermail/cmake/2008-April/021099.html) The check_symbol_exists() module solves both of the above problems, and it does verify that the function is available at link time (if the symbol isn't a #define). So, could check_function_exists() be explicitly deprecated in the documentation in favor of check_symbol_exists()? I think most users find it natural to try using check_function_exists() first because of the name, when they really should be using check_symbol_exists() for all of the use cases I can think of. Thanks! Stephen Sorley
-- 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-developers