[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41085] branches/cycles/intern/cycles/ cmake/external_libs.cmake: Cycles:
Thomas Dinges
blender at dingto.org
Mon Oct 17 13:24:20 CEST 2011
Revision: 41085
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41085
Author: dingto
Date: 2011-10-17 11:24:20 +0000 (Mon, 17 Oct 2011)
Log Message:
-----------
Cycles:
* Auto detection of CUDA toolkit, using FIND_PACKAGE(CUDA). (Requires at least CMAKE 2.8)
Modified Paths:
--------------
branches/cycles/intern/cycles/cmake/external_libs.cmake
Modified: branches/cycles/intern/cycles/cmake/external_libs.cmake
===================================================================
--- branches/cycles/intern/cycles/cmake/external_libs.cmake 2011-10-17 10:43:55 UTC (rev 41084)
+++ branches/cycles/intern/cycles/cmake/external_libs.cmake 2011-10-17 11:24:20 UTC (rev 41085)
@@ -89,10 +89,15 @@
# CUDA
if(WITH_CYCLES_CUDA)
- if(WIN32)
- set(CYCLES_CUDA "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.0" CACHE PATH "Path to CUDA installation")
+ FIND_PACKAGE(CUDA) # Try to auto locate CUDA toolkit
+ if(CUDA_FOUND)
+ set(CYCLES_CUDA ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Path to CUDA installation")
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()
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")
More information about the Bf-blender-cvs
mailing list