On Tue, Jul 12, 2011 at 4:22 AM, Roman Rakus rrakus@redhat.com wrote:
Just a question; On 07/11/2011 02:51 PM, Roman Rakus wrote:
@@ -80,6 +78,8 @@ if(NOT glib_FOUND) message(FATAL_ERROR "Glib2 header/library not found.") endif(NOT glib_FOUND) include_directories(${glib_INCLUDE_DIRS}) +SET(CMAKE_REQUIRED_LIBRARIES ${glib_LIBRARIES}) +check_function_exists (g_list_free_full HAVE_G_LIST_FREE_FULL)
# Include QMF and DBus generation macros include(MatahariMacros)
this will test if the specific function is defined. Is it better to check for function or check library version?
I prefer this approach of checking for specific features that are known to be an issue. It's much more explicit and more reliable IMO. The only place it is used in the code is around the custom implementation of this function being checked for.