mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-08 00:52:54 +00:00
4d54bb7af8
formatting Original-commit: flang-compiler/f18@1d287d9d59 Reviewed-on: https://github.com/flang-compiler/f18/pull/1096
65 lines
1.5 KiB
CMake
65 lines
1.5 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)
|
|
|
|
add_library(FortranRuntime
|
|
ISO_Fortran_binding.cpp
|
|
allocatable.cpp
|
|
buffer.cpp
|
|
character.cpp
|
|
connection.cpp
|
|
derived-type.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
|
|
stop.cpp
|
|
terminator.cpp
|
|
tools.cpp
|
|
transformational.cpp
|
|
type-code.cpp
|
|
unit.cpp
|
|
unit-map.cpp
|
|
)
|
|
|
|
target_include_directories(FortranRuntime
|
|
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
|
)
|
|
|
|
target_link_libraries(FortranRuntime
|
|
FortranDecimal
|
|
)
|