1 # - Define macro to check if DLOPEN is defined
3 # GMX_TEST_DLOPEN(VARIABLE)
5 # VARIABLE will be set if dlopen is present in dlfcn.h
8 MACRO(GMX_TEST_DLOPEN VARIABLE)
9 IF(NOT DEFINED ${VARIABLE})
10 MESSAGE(STATUS "Checking for dlopen")
12 set(CMAKE_REQUIRED_INCLUDES "dlfcn.h")
13 set(CMAKE_REQUIRED_LIBRARIES "dl")
14 check_c_source_compiles(
21 MESSAGE(STATUS "Checking for dlopen - found")
22 set(${VARIABLE} 1 CACHE INTERNAL "Result of test for dlopen" FORCE)
24 MESSAGE(STATUS "Checking for dlopen - not found")
25 set(${VARIABLE} 0 CACHE INTERNAL "Result of test for dlopen" FORCE)