Skip to content

Commit 6228dd4

Browse files
committed
Merge branch 'users/meinersbur/flang_runtime' into users/meinersbur/flang_runtime_shared
2 parents 899723e + de833aa commit 6228dd4

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#===-- lib/flang_rt/CUDA/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+
#===------------------------------------------------------------------------===#
8+
9+
10+
add_flangrt_library(CufRuntime STATIC
11+
allocatable.cpp
12+
allocator.cpp
13+
descriptor.cpp
14+
kernel.cpp
15+
memmove-function.cpp
16+
memory.cpp
17+
registration.cpp
18+
)
19+
20+
# libCufRuntime depends on a certain version of CUDA. To be able to have
21+
# multiple build of this library with different CUDA version, the version is
22+
# added to the library name.
23+
set_target_properties(CufRuntime
24+
PROPERTIES
25+
OUTPUT_NAME "CufRuntime_cuda_${CUDAToolkit_VERSION_MAJOR}"
26+
)
27+
28+
target_include_directories(CufRuntime PRIVATE ${CUDAToolkit_INCLUDE_DIRS})
29+
30+
target_link_libraries(CufRuntime
31+
PUBLIC
32+
flang_rt
33+
CUDA::cudart_static
34+
)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#===-- unittests/Runtime/CUDA/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+
#===------------------------------------------------------------------------===#
8+
9+
add_flangrt_unittest(FlangCufRuntimeTests
10+
Allocatable.cpp
11+
AllocatorCUF.cpp
12+
Memory.cpp
13+
)
14+
15+
target_link_libraries(FlangCufRuntimeTests
16+
PRIVATE
17+
CufRuntime
18+
)

0 commit comments

Comments
 (0)