Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-10-17 15:54:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-17 15:54:43 +0400
commit97e58e499d8969b344333449514499cf1f5fdfce (patch)
treeb6ddb86923d7ecddaa67184ec1f4a4ae37bb63f5 /intern/cycles/cmake/external_libs.cmake
parentc18e9a1bc6c3712da4ecaa4e49ecf8201993a58e (diff)
use CMake's CUDA_NVCC_EXECUTABLE rather then own hard coded CYCLES_CUDA variable.
Diffstat (limited to 'intern/cycles/cmake/external_libs.cmake')
-rw-r--r--intern/cycles/cmake/external_libs.cmake26
1 files changed, 7 insertions, 19 deletions
diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake
index b6a67a9b86c..0915d4d92c8 100644
--- a/intern/cycles/cmake/external_libs.cmake
+++ b/intern/cycles/cmake/external_libs.cmake
@@ -82,33 +82,21 @@ if(WITH_CYCLES_BLENDER)
${CMAKE_SOURCE_DIR}/source/blender/blenloader
${CMAKE_BINARY_DIR}/source/blender/makesrna/intern)
- ADD_DEFINITIONS(-DBLENDER_PLUGIN)
+ add_definitions(-DBLENDER_PLUGIN)
endif()
###########################################################################
# CUDA
if(WITH_CYCLES_CUDA)
- FIND_PACKAGE(CUDA) # Try to auto locate CUDA toolkit
+ 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")
+ message(STATUS "CUDA nvcc = ${CUDA_NVCC_EXECUTABLE}")
+ 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")
else()
- 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()
+ message(STATUS "CUDA compiler not found, disabling WITH_CYCLES_CUDA")
+ set(WITH_CYCLES_CUDA OFF)
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")
-
- find_program(CUDA_NVCC NAMES nvcc PATHS ${CYCLES_CUDA}/bin NO_DEFAULT_PATH)
-
- if(CUDA_NVCC)
- message(STATUS "CUDA nvcc = ${CUDA_NVCC}")
- else()
- message(STATUS "CUDA compiler not found")
- endif()
-
endif()