2020-02-26 07:22:14 +08:00
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
2020-01-10 00:10:57 +08:00
|
|
|
|
[flang] Use LLVM's flags
Summary:
The only difference is that LLVM_ENABLE_WERROR is set to OFF
by default, but we enable this in a standalone flang build
This commit fixes some windows issues with the flags
Reviewers: DavidTruby, jdoerfert, sscalpone
Reviewed By: DavidTruby, sscalpone
Subscribers: ormris, richard.barton.arm, mehdi_amini, Meinersbur, ChinouneMehdi, tskeith, mgorny, llvm-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D78306
2020-06-08 22:08:35 +08:00
|
|
|
# RuntimeTesting needs exceptions enabled
|
|
|
|
set(LLVM_REQUIRES_EH ON)
|
|
|
|
set(LLVM_REQUIRES_RTTI ON)
|
2020-02-14 06:41:56 +08:00
|
|
|
add_library(RuntimeTesting
|
|
|
|
testing.cpp
|
2020-04-24 08:07:45 +08:00
|
|
|
)
|
[flang] Use LLVM's flags
Summary:
The only difference is that LLVM_ENABLE_WERROR is set to OFF
by default, but we enable this in a standalone flang build
This commit fixes some windows issues with the flags
Reviewers: DavidTruby, jdoerfert, sscalpone
Reviewed By: DavidTruby, sscalpone
Subscribers: ormris, richard.barton.arm, mehdi_amini, Meinersbur, ChinouneMehdi, tskeith, mgorny, llvm-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D78306
2020-06-08 22:08:35 +08:00
|
|
|
llvm_update_compile_flags(RuntimeTesting)
|
2020-02-14 06:41:56 +08:00
|
|
|
|
2020-10-15 16:46:02 +08:00
|
|
|
if (LLVM_LINK_LLVM_DYLIB)
|
|
|
|
set(llvm_libs LLVM)
|
|
|
|
else()
|
|
|
|
llvm_map_components_to_libnames(llvm_libs Support)
|
|
|
|
endif()
|
2020-07-10 02:08:41 +08:00
|
|
|
target_link_libraries(RuntimeTesting
|
|
|
|
FortranRuntime
|
2020-10-15 16:46:02 +08:00
|
|
|
${llvm_libs}
|
2020-07-10 02:08:41 +08:00
|
|
|
)
|
|
|
|
|
2020-07-16 21:15:07 +08:00
|
|
|
add_flang_nongtest_unittest(format
|
2020-02-14 06:41:56 +08:00
|
|
|
RuntimeTesting
|
2020-04-24 08:07:45 +08:00
|
|
|
FortranRuntime
|
2020-01-10 00:10:57 +08:00
|
|
|
)
|
|
|
|
|
2020-07-16 21:15:07 +08:00
|
|
|
add_flang_nongtest_unittest(hello
|
2020-02-14 06:41:56 +08:00
|
|
|
RuntimeTesting
|
2020-04-24 08:07:45 +08:00
|
|
|
FortranRuntime
|
2020-01-17 05:51:25 +08:00
|
|
|
)
|
|
|
|
|
2020-07-16 21:15:07 +08:00
|
|
|
# This test is not run by default as it requires input.
|
2020-01-24 08:59:27 +08:00
|
|
|
add_executable(external-hello-world
|
|
|
|
external-hello.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(external-hello-world
|
|
|
|
FortranRuntime
|
|
|
|
)
|
2020-02-14 06:41:56 +08:00
|
|
|
|
2020-07-16 21:15:07 +08:00
|
|
|
add_flang_nongtest_unittest(external-io
|
2020-07-05 05:24:32 +08:00
|
|
|
RuntimeTesting
|
|
|
|
FortranRuntime
|
|
|
|
)
|
|
|
|
|
2020-07-16 21:15:07 +08:00
|
|
|
add_flang_nongtest_unittest(list-input
|
2020-02-14 06:41:56 +08:00
|
|
|
RuntimeTesting
|
2020-04-24 08:07:45 +08:00
|
|
|
FortranRuntime
|
2020-02-14 06:41:56 +08:00
|
|
|
)
|
|
|
|
|
2020-07-16 21:15:07 +08:00
|
|
|
add_flang_nongtest_unittest(character
|
2020-04-24 08:07:45 +08:00
|
|
|
RuntimeTesting
|
|
|
|
FortranRuntime
|
|
|
|
)
|