Skip to content

Commit

Permalink
Try #700:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Jun 20, 2023
2 parents b38f3b6 + 674a29f commit 6248fde
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .jenkins/cscs/env-gcc-cuda-11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
11 changes: 6 additions & 5 deletions cmake/pika_setup_cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6248fde

Please sign in to comment.