File: CheckCFortranFunctionExists.cmake

package info (click to toggle)
tiledarray 0.6.0-5.2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 5,844 kB
  • sloc: cpp: 31,688; sh: 237; ansic: 227; makefile: 57; python: 12
file content (14 lines) | stat: -rw-r--r-- 489 bytes parent folder | download | duplicates (4)
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()