1 # - Define macro to check return type of signals (int/void)
3 # GMX_TEST_RETSIGTYPE(VARIABLE)
5 # VARIABLE will be set to the return type of signals - "int" or "void"
7 # Remember to have a cmakedefine for it too...
9 MACRO(GMX_TEST_RETSIGTYPE VARIABLE)
10 IF(NOT DEFINED ${VARIABLE})
12 MESSAGE(STATUS "Checking for return type of signals")
14 # First check without any special flags
15 TRY_COMPILE(RETSIGTYPE_INT_OK "${CMAKE_BINARY_DIR}"
16 "${CMAKE_SOURCE_DIR}/cmake/TestRetSigType.c")
19 MESSAGE(STATUS "Checking for return type of signals - int")
20 set(${VARIABLE} "int" CACHE INTERNAL "Result of test for signal return type" FORCE)
21 else(RETSIGTYPE_INT_OK)
22 MESSAGE(STATUS "Checking for return type of signals - void")
23 set(${VARIABLE} "void" CACHE INTERNAL "Result of test for signal return type" FORCE)
24 endif(RETSIGTYPE_INT_OK)
26 ENDIF(NOT DEFINED ${VARIABLE})
27 ENDMACRO(GMX_TEST_RETSIGTYPE VARIABLE)