Merge "added support for graphs not starting at 0" into release-4-6
[gromacs/AngularHB.git] / cmake / gmxTestXDR.cmake
blob28844e66a780189da0c1bb6976b0d3951a111482
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")
18         if(XDR_COMPILE_OK)
19             MESSAGE(STATUS "Checking for system XDR support - present")                 
20         else(XDR_COMPILE_OK)
21             MESSAGE(STATUS "Checking for system XDR support - not present")
22         endif(XDR_COMPILE_OK)
24         set(${VARIABLE} ${XDR_COMPILE_OK} CACHE INTERNAL "Result of test for system XDR support" FORCE)
25         
26     ENDIF(NOT DEFINED ${VARIABLE})
27 ENDMACRO(GMX_TEST_XDR VARIABLE)