Cycles:
* Auto detection of CUDA toolkit, using FIND_PACKAGE(CUDA). (Requires at least CMAKE 2.8)
This commit is contained in:
@@ -89,10 +89,15 @@ endif()
|
|||||||
# CUDA
|
# CUDA
|
||||||
|
|
||||||
if(WITH_CYCLES_CUDA)
|
if(WITH_CYCLES_CUDA)
|
||||||
if(WIN32)
|
FIND_PACKAGE(CUDA) # Try to auto locate CUDA toolkit
|
||||||
set(CYCLES_CUDA "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.0" CACHE PATH "Path to CUDA installation")
|
if(CUDA_FOUND)
|
||||||
|
set(CYCLES_CUDA ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Path to CUDA installation")
|
||||||
else()
|
else()
|
||||||
set(CYCLES_CUDA "/usr/local/cuda" CACHE PATH "Path to CUDA installation")
|
if(WIN32)
|
||||||
|
set(CYCLES_CUDA "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.0" CACHE PATH "Path to CUDA installation")
|
||||||
|
else()
|
||||||
|
set(CYCLES_CUDA "/usr/local/cuda" CACHE PATH "Path to CUDA installation")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
set(CYCLES_CUDA_ARCH sm_10 sm_11 sm_12 sm_13 sm_20 sm_21 CACHE STRING "CUDA architectures to build for")
|
set(CYCLES_CUDA_ARCH sm_10 sm_11 sm_12 sm_13 sm_20 sm_21 CACHE STRING "CUDA architectures to build for")
|
||||||
set(CYCLES_CUDA_MAXREG 24 CACHE STRING "CUDA maximum number of register to use")
|
set(CYCLES_CUDA_MAXREG 24 CACHE STRING "CUDA maximum number of register to use")
|
||||||
|
Reference in New Issue
Block a user