blob: 5c61cebf3c709acb195b3d3dcb9c9c4df838abb6 [file] [log] [blame]
Jean Perier7a6ab392021-10-01 06:58:521#===-- runtime/CMakeLists.txt ----------------------------------------------===#
2#
3# 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
6#
7#===------------------------------------------------------------------------===#
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
Andrzej Warzynski97a32d32022-03-17 16:24:5433add_subdirectory(FortranMain)
34
Jean Perier7a6ab392021-10-01 06:58:5235add_flang_library(FortranRuntime
Alexis Perry352d3472020-01-28 02:18:4536 ISO_Fortran_binding.cpp
peter klausler4d54bb72020-03-30 23:37:3037 allocatable.cpp
peter klausler65f52902021-07-29 19:02:4538 assign.cpp
peter klauslerf7be2512020-01-24 00:59:2739 buffer.cpp
Diana Picus0c375292021-08-25 07:51:4840 command.cpp
peter klauslere372e0f2021-03-31 16:14:0841 complex-reduction.c
peter klauslerc1db35f2021-05-20 17:37:0342 copy.cpp
peter klausler4d54bb72020-03-30 23:37:3043 character.cpp
peter klausler95696d52020-02-05 00:55:4544 connection.cpp
peter klausler4fede8b2020-12-07 22:46:2445 derived.cpp
peter klauslera48e4162021-07-19 18:53:2046 derived-api.cpp
Alexis Perry352d3472020-01-28 02:18:4547 descriptor.cpp
peter klausler43fadef2021-06-25 17:40:0848 descriptor-io.cpp
peter klausler50e0b292021-05-12 19:07:5149 dot-product.cpp
peter klausler3b635712020-02-13 22:41:5650 edit-input.cpp
51 edit-output.cpp
peter klauslerf7be2512020-01-24 00:59:2752 environment.cpp
Peter Klausler627a8ac2021-12-07 22:38:1753 extensions.cpp
peter klauslerbeb5ac82021-04-22 21:23:4554 extrema.cpp
Alexis Perry352d3472020-01-28 02:18:4555 file.cpp
peter klauslerbeb5ac82021-04-22 21:23:4556 findloc.cpp
Alexis Perry352d3472020-01-28 02:18:4557 format.cpp
Peter Steinfeld6cd417b2022-02-09 19:17:1858 inquiry.cpp
peter klausler95696d52020-02-05 00:55:4559 internal-unit.cpp
peter klausler3b635712020-02-13 22:41:5660 iostat.cpp
Alexis Perry352d3472020-01-28 02:18:4561 io-api.cpp
62 io-error.cpp
63 io-stmt.cpp
64 main.cpp
peter klausler5e1421b2021-05-17 21:06:4465 matmul.cpp
Alexis Perry352d3472020-01-28 02:18:4566 memory.cpp
peter klausler78a39d22021-04-02 16:30:3167 misc-intrinsic.cpp
peter klausler6a1c3ef2021-05-05 18:37:4968 namelist.cpp
peter klausler5f6c5c62021-04-01 19:59:5969 numeric.cpp
Valentin Clement6116ff22021-12-07 20:19:3470 ragged.cpp
peter klauslere1114042021-04-07 20:14:1471 random.cpp
peter klauslere372e0f2021-03-31 16:14:0872 reduction.cpp
peter klauslerad424cf2021-07-16 17:42:1773 pointer.cpp
peter klauslerbeb5ac82021-04-22 21:23:4574 product.cpp
peter klausler8df28f02020-11-10 23:13:0275 stat.cpp
Alexis Perry352d3472020-01-28 02:18:4576 stop.cpp
peter klauslerbeb5ac82021-04-22 21:23:4577 sum.cpp
Peter Klausler77ff6f72021-11-26 19:39:3178 support.cpp
Alexis Perry352d3472020-01-28 02:18:4579 terminator.cpp
Diana Picus57e85622021-06-09 08:19:4380 time-intrinsic.cpp
Alexis Perry352d3472020-01-28 02:18:4581 tools.cpp
82 transformational.cpp
83 type-code.cpp
peter klausler79caf692021-06-17 20:13:1984 type-info.cpp
peter klauslerf7be2512020-01-24 00:59:2785 unit.cpp
peter klausler3b635712020-02-13 22:41:5686 unit-map.cpp
Peter Klauslerbafbae22022-03-16 19:32:0387 utf.cpp
peter klauslera8fed822018-08-02 18:45:1188
Mehdi Chinoune2d6b9db2020-04-16 12:34:1789 LINK_LIBS
peter klausler491122d2020-01-16 21:51:2590 FortranDecimal
Diana Picus467abac2022-08-11 09:21:4091
92 INSTALL_WITH_TOOLCHAIN
peter klauslera8fed822018-08-02 18:45:1193)