diff --git a/.jenkins/cscs/env-gcc-cuda-11.sh b/.jenkins/cscs/env-gcc-cuda-11.sh index 562d51f30c..4b12afb111 100644 --- a/.jenkins/cscs/env-gcc-cuda-11.sh +++ b/.jenkins/cscs/env-gcc-cuda-11.sh @@ -4,7 +4,8 @@ # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -cxx_std="17" +cxx_std="20" +cuda_std="17" gcc_version="9.3.0" boost_version="1.75.0" hwloc_version="2.0.3" @@ -15,6 +16,7 @@ spack_arch="cray-cnl7-haswell" spack_spec="pika@main arch=${spack_arch} %${spack_compiler} +cuda malloc=system cxxstd=${cxx_std} ^boost@${boost_version} ^hwloc@${hwloc_version} ^cuda@${cuda_version}" configure_extra_options+=" -DPIKA_WITH_CXX_STANDARD=${cxx_std}" +configure_extra_options+=" -DCMAKE_CUDA_STANDARD=${cuda_std}" configure_extra_options+=" -DPIKA_WITH_MALLOC=system" configure_extra_options+=" -DPIKA_WITH_CUDA=ON" configure_extra_options+=" -DPIKA_WITH_EXAMPLES_OPENMP=ON" diff --git a/cmake/pika_setup_cuda.cmake b/cmake/pika_setup_cuda.cmake index 2a8b719aa8..e28505876a 100644 --- a/cmake/pika_setup_cuda.cmake +++ b/cmake/pika_setup_cuda.cmake @@ -28,14 +28,15 @@ if(PIKA_WITH_CUDA AND NOT TARGET pika_internal::cuda) # support if(NOT PIKA_FIND_PACKAGE) if(DEFINED CMAKE_CUDA_STANDARD AND NOT CMAKE_CUDA_STANDARD STREQUAL - PIKA_WITH_CXX_STANDARD + CMAKE_CXX_STANDARD ) - pika_error( - "You've set CMAKE_CUDA_STANDARD to ${CMAKE_CUDA_STANDARD} and PIKA_WITH_CXX_STANDARD to ${PIKA_WITH_CXX_STANDARD}. Please unset CMAKE_CUDA_STANDARD." + pika_info( + "You've set PIKA_WITH_CXX_STANDARD to ${PIKA_WITH_CXX_STANDARD} and CMAKE_CUDA_STANDARD to ${CMAKE_CUDA_STANDARD}." ) + else() + set(CMAKE_CUDA_STANDARD ${PIKA_WITH_CXX_STANDARD}) endif() - set(CMAKE_CUDA_STANDARD ${PIKA_WITH_CXX_STANDARD}) endif() set(CMAKE_CUDA_STANDARD_REQUIRED ON) @@ -64,7 +65,7 @@ if(PIKA_WITH_CUDA AND NOT TARGET pika_internal::cuda) endif() # Flag not working for CLANG CUDA target_compile_features( - pika_internal::cuda INTERFACE cuda_std_${PIKA_WITH_CXX_STANDARD} + pika_internal::cuda INTERFACE cuda_std_${CMAKE_CUDA_STANDARD} ) set_target_properties( pika_internal::cuda PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON