1 # - Check if the Fortran function exists.
2 # CHECK_TIME_FUNCTION(FUNCTION VARIABLE TYPE)
3 # - macro which checks if the Fortran function exists
4 # FUNCTION - the name of the Fortran function
5 # VARIABLE - variable to store the result
8 macro(CHECK_TIME_FUNCTION FUNCTION VARIABLE)
11 ${PROJECT_BINARY_DIR}/INSTALL
12 ${PROJECT_SOURCE_DIR}/INSTALL
13 TIMING secondtst_${FUNCTION}
14 OUTPUT_VARIABLE OUTPUT)
17 set(${VARIABLE} ${FUNCTION} CACHE INTERNAL "Have Fortran function ${FUNCTION}")
18 message(STATUS "Looking for Fortran ${FUNCTION} - found")
19 file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
20 "Fortran ${FUNCTION} exists. ${OUTPUT} \n\n")
22 message(STATUS "Looking for Fortran ${FUNCTION} - not found")
23 file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
24 "Fortran ${FUNCTION} does not exist. \n ${OUTPUT} \n")