1 # - Define macro to check if system XDR routines are present
3 # GMX_TEST_XDR(VARIABLE)
5 # VARIABLE will be set to true if XDR support is present
7 # Remember to have a cmakedefine for it too...
9 MACRO(GMX_TEST_XDR VARIABLE)
10 IF(NOT DEFINED ${VARIABLE})
12 MESSAGE(STATUS "Checking for system XDR support")
14 # First check without any special flags
15 TRY_COMPILE(XDR_COMPILE_OK "${CMAKE_BINARY_DIR}"
16 "${CMAKE_SOURCE_DIR}/cmake/TestXDR.c")
19 MESSAGE(STATUS "Checking for system XDR support - present")
21 MESSAGE(STATUS "Checking for system XDR support - not present")
24 set(${VARIABLE} ${XDR_COMPILE_OK} CACHE INTERNAL "Result of test for system XDR support" FORCE)
26 ENDIF(NOT DEFINED ${VARIABLE})
27 ENDMACRO(GMX_TEST_XDR VARIABLE)