Skip to content

Commit

Permalink
fix CMake find package output
Browse files Browse the repository at this point in the history
fix #3

- remove QUIET from find package for OpenCL and CUDA
- remove pascal architecture from default CUDA_ARCH for CUDA < 8.0
  • Loading branch information
psychocrypt committed Oct 10, 2017
1 parent 9af8d7f commit 70eaebe
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 @@ -47,7 +47,7 @@ option(CMAKE_LINK_STATIC "link as much as possible libraries static" OFF)

option(CUDA_ENABLE "Enable or disable CUDA support (NVIDIA backend)" ON)
if(CUDA_ENABLE)
find_package(CUDA 7.5 QUIET)
find_package(CUDA 7.5)

if(CUDA_FOUND)

Expand All @@ -70,7 +70,10 @@ if(CUDA_ENABLE)
message(STATUS "xmr-stak-nvidia: set max threads per block to ${XMR-STAK_THREADS}")
add_definitions("-DXMR_STAK_THREADS=${XMR-STAK_THREADS}")
endif()

set(DEFAULT_CUDA_ARCH "20;30;35;37;50;52")
if(CUDA_VERSION VERSION_LESS 8.0)
list(APPEND DEFAULT_CUDA_ARCH "60" "61" "62")
endif()
set(CUDA_ARCH "20;30;35;37;50;52;60;61;62" CACHE STRING "Set GPU architecture (semicolon separated list, e.g. '-DCUDA_ARCH=20;35;60')")

# validate architectures (only numbers are allowed)
Expand Down Expand Up @@ -164,7 +167,7 @@ list(APPEND CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH}")

option(OpenCL_ENABLE "Enable or disable OpenCL spport (AMD GPU support)" ON)
if(OpenCL_ENABLE)
find_package(OpenCL QUIET)
find_package(OpenCL)
if(OpenCL_FOUND)
include_directories(SYSTEM ${OpenCL_INCLUDE_DIRS})
#set(LIBS ${LIBS} ${OpenCL_LIBRARY})
Expand Down

0 comments on commit 70eaebe

Please sign in to comment.