blob: b3e96faede706cbf327b5c655e4eeb780397e047 [file] [log] [blame]
Gary Klimowicz9e7548a2019-12-20 20:52:071#===-- runtime/CMakeLists.txt ----------------------------------------------===#
peter klausler6261c092018-05-16 17:22:332#
Gary Klimowicz9e7548a2019-12-20 20:52:073# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4# See https://llvm.org/LICENSE.txt for license information.
5# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
peter klausler6261c092018-05-16 17:22:336#
Gary Klimowiczcea10402020-01-10 20:12:037#===------------------------------------------------------------------------===#
peter klausler6261c092018-05-16 17:22:338
Isuru Fernandoea5efd12020-03-12 20:28:359include(CheckCXXSymbolExists)
10include(CheckCXXSourceCompiles)
11check_cxx_symbol_exists(strerror string.h HAVE_STRERROR)
12check_cxx_symbol_exists(strerror_r string.h HAVE_STRERROR_R)
13# Can't use symbol exists here as the function is overloaded in C++
14check_cxx_source_compiles(
15 "#include <string.h>
16 int main() {
17 char buf[4096];
18 return strerror_s(buf, 4096, 0);
19 }
20 "
21 HAVE_DECL_STRERROR_S)
22
23if (NOT (HAVE_STRERROR OR HAVE_STRERROR_R OR HAVE_DECL_STRERROR_S))
24 message(FATAL_ERROR "None of strerror, strerror_r, strerror_s found.")
25endif()
26
27configure_file(config.h.cmake config.h)
Isuru Fernandobb73d1b2020-06-08 19:13:5828# include_directories is used here instead of target_include_directories
29# because add_flang_library creates multiple objects (STATIC/SHARED, OBJECT)
30# with different names
31include_directories(AFTER ${CMAKE_CURRENT_BINARY_DIR})
Isuru Fernandoea5efd12020-03-12 20:28:3532
Mehdi Chinoune2d6b9db2020-04-16 12:34:1733add_flang_library(FortranRuntime
Alexis Perry352d3472020-01-28 02:18:4534 ISO_Fortran_binding.cpp
peter klausler4d54bb72020-03-30 23:37:3035 allocatable.cpp
peter klausler65f52902021-07-29 19:02:4536 assign.cpp
peter klauslerf7be2512020-01-24 00:59:2737 buffer.cpp
Diana Picus0c375292021-08-25 07:51:4838 command.cpp
peter klauslere372e0f2021-03-31 16:14:0839 complex-reduction.c
peter klauslerc1db35f2021-05-20 17:37:0340 copy.cpp
peter klausler4d54bb72020-03-30 23:37:3041 character.cpp
peter klausler95696d52020-02-05 00:55:4542 connection.cpp
peter klausler4fede8b2020-12-07 22:46:2443 derived.cpp
peter klauslera48e4162021-07-19 18:53:2044 derived-api.cpp
Alexis Perry352d3472020-01-28 02:18:4545 descriptor.cpp
peter klausler43fadef2021-06-25 17:40:0846 descriptor-io.cpp
peter klausler50e0b292021-05-12 19:07:5147 dot-product.cpp
peter klausler3b635712020-02-13 22:41:5648 edit-input.cpp
49 edit-output.cpp
peter klauslerf7be2512020-01-24 00:59:2750 environment.cpp
peter klauslerbeb5ac82021-04-22 21:23:4551 extrema.cpp
Alexis Perry352d3472020-01-28 02:18:4552 file.cpp
peter klauslerbeb5ac82021-04-22 21:23:4553 findloc.cpp
Alexis Perry352d3472020-01-28 02:18:4554 format.cpp
peter klausler95696d52020-02-05 00:55:4555 internal-unit.cpp
peter klausler3b635712020-02-13 22:41:5656 iostat.cpp
Alexis Perry352d3472020-01-28 02:18:4557 io-api.cpp
58 io-error.cpp
59 io-stmt.cpp
60 main.cpp
peter klausler5e1421b2021-05-17 21:06:4461 matmul.cpp
Alexis Perry352d3472020-01-28 02:18:4562 memory.cpp
peter klausler78a39d22021-04-02 16:30:3163 misc-intrinsic.cpp
peter klausler6a1c3ef2021-05-05 18:37:4964 namelist.cpp
peter klausler5f6c5c62021-04-01 19:59:5965 numeric.cpp
peter klauslere1114042021-04-07 20:14:1466 random.cpp
peter klauslere372e0f2021-03-31 16:14:0867 reduction.cpp
peter klauslerad424cf2021-07-16 17:42:1768 pointer.cpp
peter klauslerbeb5ac82021-04-22 21:23:4569 product.cpp
peter klausler8df28f02020-11-10 23:13:0270 stat.cpp
Alexis Perry352d3472020-01-28 02:18:4571 stop.cpp
peter klauslerbeb5ac82021-04-22 21:23:4572 sum.cpp
Alexis Perry352d3472020-01-28 02:18:4573 terminator.cpp
Diana Picus57e85622021-06-09 08:19:4374 time-intrinsic.cpp
Alexis Perry352d3472020-01-28 02:18:4575 tools.cpp
76 transformational.cpp
77 type-code.cpp
peter klausler79caf692021-06-17 20:13:1978 type-info.cpp
peter klauslerf7be2512020-01-24 00:59:2779 unit.cpp
peter klausler3b635712020-02-13 22:41:5680 unit-map.cpp
peter klauslera8fed822018-08-02 18:45:1181
Mehdi Chinoune2d6b9db2020-04-16 12:34:1782 LINK_LIBS
peter klausler491122d2020-01-16 21:51:2583 FortranDecimal
peter klauslera8fed822018-08-02 18:45:1184)