Skip to content

Commit

Permalink
COMP: use 5.2 as the default Cuda architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Rit committed Oct 14, 2021
1 parent d3b5218 commit baffa73
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions itk-module-init.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
#
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)

# Set default Cuda architecture if not provided. The first case allows for
# backward compatibility with cmake versions before 3.20 which did not handle
# CUDAARCHS environment variable.
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
if(DEFINED ENV{CUDAARCHS})
set(CMAKE_CUDA_ARCHITECTURES "$ENV{CUDAARCHS}" CACHE STRING "CUDA architectures")
else()
set(CMAKE_CUDA_ARCHITECTURES "52" CACHE STRING "CUDA architectures")
endif()
endif()
include(CheckLanguage)
check_language(CUDA)

Expand Down

0 comments on commit baffa73

Please sign in to comment.