Skip to content

Commit

Permalink
Set cuda_std_* only if CMAKE_CUDA_STANDARD defined
Browse files Browse the repository at this point in the history
  • Loading branch information
aurianer committed Jul 3, 2023
1 parent fe11d73 commit 42fc27c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmake/pika_setup_cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ if(PIKA_WITH_CUDA AND NOT TARGET pika_internal::cuda)
pika_internal::cuda INTERFACE CUDA::cublas CUDA::cusolver
)
endif()
# Flag not working for CLANG CUDA
target_compile_features(
pika_internal::cuda INTERFACE cuda_std_${CMAKE_CUDA_STANDARD}
)
if(DEFINED CMAKE_CUDA_STANDARD)
# Flag not working for CLANG CUDA
target_compile_features(
pika_internal::cuda INTERFACE cuda_std_${CMAKE_CUDA_STANDARD}
)
endif()
set_target_properties(
pika_internal::cuda PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON
)
Expand Down

0 comments on commit 42fc27c

Please sign in to comment.