File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 8
8
9
9
include_directories (${CUDAToolkit_INCLUDE_DIRS} )
10
10
11
- add_flang_library (CufRuntime
11
+ # libCufRuntime depends on a certain version of CUDA. To be able to have
12
+ # multiple build of this library with different CUDA version, the version is
13
+ # added to the library name.
14
+ set (CUFRT_LIBNAME CufRuntime_cuda_${CUDAToolkit_VERSION_MAJOR} )
15
+
16
+ add_flang_library (${CUFRT_LIBNAME}
12
17
allocator.cpp
13
18
descriptor.cpp
14
19
)
19
24
set (CUDA_RT_TARGET CUDA::cudart_static )
20
25
endif ()
21
26
22
- target_link_libraries (CufRuntime
27
+ target_link_libraries (${CUFRT_LIBNAME}
23
28
PRIVATE
24
29
FortranRuntime
25
30
${CUDA_RT_TARGET}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ add_flang_unittest(FlangCufRuntimeTests
6
6
7
7
target_link_libraries (FlangCufRuntimeTests
8
8
PRIVATE
9
- CufRuntime
9
+ CufRuntime_cuda_${CUDAToolkit_VERSION_MAJOR}
10
10
FortranRuntime
11
11
)
12
12
You can’t perform that action at this time.
0 commit comments