File: CheckCFortranFunctionExists.cmake

package info (click to toggle)
btas 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,132 kB
  • sloc: cpp: 26,486; ansic: 1,545; makefile: 5
file content (14 lines) | stat: -rw-r--r-- 489 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
include(CheckFunctionExists)

macro(check_c_fortran_function_exists _func_base _result)
  string(TOLOWER "${_func_base}" _func_base_lower)
  string(TOUPPER "${_func_base}" _func_base_upper)
  set(${_result} FALSE)
  foreach(_func ${_func_base_lower}_;${_func_base_lower};${_func_base_lower}__;${_func_base_upper};${_func_base_upper}_)
    check_function_exists(${_func} _${_func}_found)
    if(_${_func}_found)
      set(${_result} TRUE)
      break()
    endif()
  endforeach()
endmacro()