Skip to content

Commit

Permalink
Fix bug in script for current CMakes
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Apr 12, 2018
1 parent 4e52e4d commit 2acdd6d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion select_compute_arch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ set(CUDA_KNOWN_GPU_ARCHITECTURES "Fermi" "Kepler" "Maxwell")
# This list will be used for CUDA_ARCH_NAME = Common option (enabled by default)
set(CUDA_COMMON_GPU_ARCHITECTURES "3.0" "3.5" "5.0")

if(CMAKE_CUDA_COMPILER_LOADED) # CUDA as a language
if(NOT CMAKE_CUDA_COMPILER_LOADED AND DEFINED CMAKE_CUDA_COMPILER_ID)
set(CMAKE_CUDA_COMPILER_LOADED 1)
endif()

if(CMAKE_CUDA_COMPILER_LOADED OR DEFINED CMAKE_CUDA_COMPILER_ID) # CUDA as a language
if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA")
set(CUDA_VERSION "${CMAKE_CUDA_COMPILER_VERSION}")
endif()
Expand Down

0 comments on commit 2acdd6d

Please sign in to comment.