blob: 7d5c88e78825da44211fee16b5247cef25f70f28 [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 klauslerf7be2512020-01-24 00:59:2736 buffer.cpp
peter klauslere372e0f2021-03-31 16:14:0837 complex-reduction.c
peter klauslerc1db35f2021-05-20 17:37:0338 copy.cpp
peter klausler4d54bb72020-03-30 23:37:3039 character.cpp
peter klausler95696d52020-02-05 00:55:4540 connection.cpp
peter klausler4fede8b2020-12-07 22:46:2441 derived.cpp
Alexis Perry352d3472020-01-28 02:18:4542 descriptor.cpp
peter klausler50e0b292021-05-12 19:07:5143 dot-product.cpp
peter klausler3b635712020-02-13 22:41:5644 edit-input.cpp
45 edit-output.cpp
peter klauslerf7be2512020-01-24 00:59:2746 environment.cpp
peter klauslerbeb5ac82021-04-22 21:23:4547 extrema.cpp
Alexis Perry352d3472020-01-28 02:18:4548 file.cpp
peter klauslerbeb5ac82021-04-22 21:23:4549 findloc.cpp
Alexis Perry352d3472020-01-28 02:18:4550 format.cpp
peter klausler95696d52020-02-05 00:55:4551 internal-unit.cpp
peter klausler3b635712020-02-13 22:41:5652 iostat.cpp
Alexis Perry352d3472020-01-28 02:18:4553 io-api.cpp
54 io-error.cpp
55 io-stmt.cpp
56 main.cpp
peter klausler5e1421b2021-05-17 21:06:4457 matmul.cpp
Alexis Perry352d3472020-01-28 02:18:4558 memory.cpp
peter klausler78a39d22021-04-02 16:30:3159 misc-intrinsic.cpp
peter klausler6a1c3ef2021-05-05 18:37:4960 namelist.cpp
peter klausler5f6c5c62021-04-01 19:59:5961 numeric.cpp
peter klauslere1114042021-04-07 20:14:1462 random.cpp
peter klauslere372e0f2021-03-31 16:14:0863 reduction.cpp
peter klauslerbeb5ac82021-04-22 21:23:4564 product.cpp
peter klausler8df28f02020-11-10 23:13:0265 stat.cpp
Alexis Perry352d3472020-01-28 02:18:4566 stop.cpp
peter klauslerbeb5ac82021-04-22 21:23:4567 sum.cpp
Alexis Perry352d3472020-01-28 02:18:4568 terminator.cpp
69 tools.cpp
70 transformational.cpp
71 type-code.cpp
peter klauslerf7be2512020-01-24 00:59:2772 unit.cpp
peter klausler3b635712020-02-13 22:41:5673 unit-map.cpp
peter klauslera8fed822018-08-02 18:45:1174
Mehdi Chinoune2d6b9db2020-04-16 12:34:1775 LINK_LIBS
peter klausler491122d2020-01-16 21:51:2576 FortranDecimal
peter klauslera8fed822018-08-02 18:45:1177)