Skip to content

Commit 8dbc647

Browse files
committed
Make target property CUDA_SEPARABLE_COMPILATION work
1 parent c2a78b3 commit 8dbc647

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

flang-rt/cmake/modules/AddFlangRTOffload.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ macro(enable_cuda_compilation name files)
1010
if (FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT STREQUAL "CUDA")
1111
enable_language(CUDA)
1212

13-
# TODO: figure out how to make target property CUDA_SEPARABLE_COMPILATION
14-
# work, and avoid setting CMAKE_CUDA_SEPARABLE_COMPILATION.
15-
set(CMAKE_CUDA_SEPARABLE_COMPILATION ON)
13+
set_target_properties(${name}
14+
PROPERTIES
15+
CUDA_SEPARABLE_COMPILATION ON
16+
)
1617

1718
# Treat all supported sources as CUDA files.
1819
set_source_files_properties(${files} PROPERTIES LANGUAGE CUDA)

0 commit comments

Comments
 (0)