llvm/flang/runtime/CMakeLists.txt
peter klausler 4fede8bc8a [flang] Implement derived type description table encoding
Define Fortran derived types that describe the characteristics
of derived types, and instantiations of parameterized derived
types, that are of relevance to the runtime language support
library.  Define a suite of corresponding C++ structure types
for the runtime library to use to interpret instances of the
descriptions.

Create instances of these description types in Semantics as
static initializers for compiler-created objects in the scopes
that define or instantiate user derived types.

Delete obsolete code from earlier attempts to package runtime
type information.

Differential Revision: https://reviews.llvm.org/D92802
2020-12-08 10:26:58 -08:00

65 lines
1.6 KiB
CMake

#===-- runtime/CMakeLists.txt ----------------------------------------------===#
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===------------------------------------------------------------------------===#
include(CheckCXXSymbolExists)
include(CheckCXXSourceCompiles)
check_cxx_symbol_exists(strerror string.h HAVE_STRERROR)
check_cxx_symbol_exists(strerror_r string.h HAVE_STRERROR_R)
# Can't use symbol exists here as the function is overloaded in C++
check_cxx_source_compiles(
"#include <string.h>
int main() {
char buf[4096];
return strerror_s(buf, 4096, 0);
}
"
HAVE_DECL_STRERROR_S)
if (NOT (HAVE_STRERROR OR HAVE_STRERROR_R OR HAVE_DECL_STRERROR_S))
message(FATAL_ERROR "None of strerror, strerror_r, strerror_s found.")
endif()
configure_file(config.h.cmake config.h)
# include_directories is used here instead of target_include_directories
# because add_flang_library creates multiple objects (STATIC/SHARED, OBJECT)
# with different names
include_directories(AFTER ${CMAKE_CURRENT_BINARY_DIR})
add_flang_library(FortranRuntime
ISO_Fortran_binding.cpp
allocatable.cpp
buffer.cpp
character.cpp
connection.cpp
derived.cpp
descriptor.cpp
edit-input.cpp
edit-output.cpp
environment.cpp
file.cpp
format.cpp
internal-unit.cpp
iostat.cpp
io-api.cpp
io-error.cpp
io-stmt.cpp
main.cpp
memory.cpp
stat.cpp
stop.cpp
terminator.cpp
tools.cpp
transformational.cpp
type-code.cpp
unit.cpp
unit-map.cpp
LINK_LIBS
FortranDecimal
)