Skip to content

Commit

Permalink
Set back CUDA default to C++14.
Browse files Browse the repository at this point in the history
  • Loading branch information
ye-luo committed Sep 29, 2021
1 parent 734415c commit 57e55d3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,6 @@ endif()
set(CMAKE_CXX_STANDARD ${QMC_CXX_STANDARD})
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CUDA_STANDARD ${QMC_CXX_STANDARD})
set(CMAKE_CUDA_STANDARD_REQUIRED TRUE)
set(CMAKE_CUDA_EXTENSIONS OFF)

# Check that a C++ compiler is compatible with the underlying libstdc++
include(Testlibstdc++)
Expand Down Expand Up @@ -672,6 +669,12 @@ if(QMC_CUDA OR ENABLE_CUDA)
unset(CUDA_ARCH CACHE)
message(FATAL_ERROR "CUDA_ARCH option has been removed. Use -DCMAKE_CUDA_ARCHITECTURES=80 if -DCUDA_ARCH=sm_80 was used.")
endif()
# a few production machines use CUDA 10 which only supports C++14.
if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD 14)
endif()
set(CMAKE_CUDA_STANDARD_REQUIRED TRUE)
set(CMAKE_CUDA_EXTENSIONS OFF)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 70)
endif()
Expand Down

0 comments on commit 57e55d3

Please sign in to comment.