File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,15 +129,16 @@ The "error" examples show this.
129129
130130### ISO_Fortran_binding.h
131131
132- On 2019-01-12 [ a GCC commit] ( https://github.com/gcc-mirror/gcc/commit/bbf18dc5d248a79a20ebf4b3a751669cd75485fd )
132+ On 2019-01-12
133+ [ a GCC commit] ( https://github.com/gcc-mirror/gcc/commit/bbf18dc5d248a79a20ebf4b3a751669cd75485fd )
133134from Paul Thomas brought ISO_Fortran_binding.h to
134135[ GCC 9] ( https://gcc.gnu.org/gcc-9/changes.html ) .
135136
136137Compilers having "ISO_Fortran_binding.h" include:
137138
138139* GCC &ge ; 9
139140* Intel oneAPI
140- * Clang / Flang LLVM &ge ; 19
141+ * Clang / Flang LLVM &ge ; 19 (note for macos: not AppleClang yet, need to use Homebrew Clang + Flang)
141142* IBM OpenXL
142143* Cray Fortran
143144
Original file line number Diff line number Diff line change @@ -70,7 +70,16 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
7070elseif (CMAKE_C_COMPILER_ID STREQUAL "NVHPC" )
7171 set (CMAKE_REQUIRED_LIBRARIES nvf)
7272elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang" )
73- set (CMAKE_REQUIRED_LIBRARIES FortranRuntime FortranDecimal)
73+ find_library (flang_rt
74+ NAMES flang_rt.runtime FortranRuntime
75+ NAMES_PER_DIR
76+ )
77+ # newer Flang versions have flang_rt.runtime, older Flang have FortranRuntime
78+ if (flang_rt)
79+ set (CMAKE_REQUIRED_LIBRARIES ${flang_rt} )
80+ else ()
81+ message (WARNING "Couldn't find Flang runtime library; some checks may fail" )
82+ endif ()
7483endif ()
7584
7685# some compilers (e.g. NVHPC) have ISO_Fortran_binding.h but don't
You can’t perform that action at this time.
0 commit comments