@@ -3,7 +3,7 @@ MESSAGE( STATUS ">> --------------------- Spirit -------------------------------
33
44
55######### CMake Version ############################################
6- cmake_minimum_required ( VERSION 3.15 FATAL_ERROR )
6+ cmake_minimum_required ( VERSION 3.18 FATAL_ERROR )
77####################################################################
88
99
@@ -68,6 +68,7 @@ if( SPIRIT_USE_CUDA )
6868 set ( SPIRIT_USE_FFTW OFF )
6969 ### Enable CUDA language support
7070 enable_language ( CUDA )
71+ set ( CMAKE_CUDA_ARCHITECTURES "${SPIRIT_CUDA_ARCH} " )
7172endif ()
7273#-----
7374if ( SPIRIT_USE_STDPAR )
@@ -146,17 +147,17 @@ include(CompilerFlags)
146147######### CUDA decisions ###########################################
147148if ( SPIRIT_USE_CUDA )
148149 # set( CUDA_TOOLKIT_ROOT_DIR /opt/cuda )
149- find_package ( CUDA 8 REQUIRED )
150+ find_package ( CUDAToolkit 12 REQUIRED )
150151
151152 # set( CUDA_PROPAGATE_HOST_FLAGS ON )
152153 # --std=c++17 flag may be necessary, but it is propagated from global flags...
153154 # if it appears twice, for some reason the compilation breaks
154155
155- set ( SPIRIT_CUDA_LIBS "${CUDA_LIBRARIES} ; ${CUDA_CUFFT_LIBRARIES} ; ${CUDA_curand_LIBRARY} " )
156- set ( FFT_LIB ${CUDA_CUFFT_LIBRARIES} )
156+ set ( SPIRIT_CUDA_LIBS "CUDA::cudart;CUDA::cufft;CUDA::curand " )
157+ set ( FFT_LIB CUDA::cufft )
157158
158159 if ( "${CMAKE_CUDA_COMPILER_ID} " MATCHES "NVIDIA" )
159- set ( CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -lineinfo -arch=sm_ ${SPIRIT_CUDA_ARCH} - -expt-relaxed-constexpr --expt-extended-lambda" )
160+ set ( CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -lineinfo --expt-relaxed-constexpr --expt-extended-lambda" )
160161 ### Deactivate CUDA warning inside Eigen such as "warning: __host__ annotation is ignored on a function("Quaternion") that is explicitly defaulted on its first declaration"
161162 set ( CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --diag-suppress=20011 --diag-suppress=20012 --diag-suppress=20014 --diag-suppress=1675" )
162163 ### Display warning number when writing a warning
0 commit comments