Skip to content

Commit

Permalink
[cmake] for cmake v3.28 set policy CMP0146 to OLD to satisfy BLT …
Browse files Browse the repository at this point in the history
…that still uses FindCUDA

resolves #438
  • Loading branch information
evaleev committed Dec 24, 2023
1 parent 81bafdc commit c8ef08b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions external/cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ else()
set(CMAKE_CUDA_FLAGS "--expt-relaxed-constexpr")
endif()
enable_language(CUDA)
# BLT will need FindCUDA until https://github.com/LLNL/blt/pull/585 is merged
# with CMake 3.28+ needs to set CMP0146 to OLD
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.28)
cmake_policy(SET CMP0146 OLD)
endif()

set(CUDA_FOUND TRUE)
set(TILEDARRAY_HAS_CUDA 1 CACHE BOOL "Whether TiledArray has CUDA support")
Expand Down

0 comments on commit c8ef08b

Please sign in to comment.