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>2014-03-13 16:31:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-13 16:31:06 +0400
commit23fd670c39ac6f631e6826988b65a6f1a99b536d (patch)
tree5b56a09906600f66eb8de74587e6dbbdc4828afa /intern/cycles
parent899caeae498434462d0cb4775c10944929d325c4 (diff)
Code cleanup: cmake
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/CMakeLists.txt29
-rw-r--r--intern/cycles/blender/CMakeLists.txt6
-rw-r--r--intern/cycles/kernel/CMakeLists.txt20
3 files changed, 43 insertions, 12 deletions
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 5c8d68b07ee..c2f40295421 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -53,7 +53,12 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math")
endif()
-add_definitions(-DWITH_KERNEL_SSE2 -DWITH_KERNEL_SSE3 -DWITH_KERNEL_SSE41 -DWITH_KERNEL_AVX)
+add_definitions(
+ -DWITH_KERNEL_SSE2
+ -DWITH_KERNEL_SSE3
+ -DWITH_KERNEL_SSE41
+ -DWITH_KERNEL_AVX
+)
# for OSL
if(WIN32 AND MSVC)
@@ -64,10 +69,15 @@ endif()
# Definitions and Includes
-add_definitions(${BOOST_DEFINITIONS} ${OPENIMAGEIO_DEFINITIONS})
+add_definitions(
+ ${BOOST_DEFINITIONS}
+ ${OPENIMAGEIO_DEFINITIONS}
+)
-add_definitions(-DCCL_NAMESPACE_BEGIN=namespace\ ccl\ {)
-add_definitions(-DCCL_NAMESPACE_END=})
+add_definitions(
+ -DCCL_NAMESPACE_BEGIN=namespace\ ccl\ {
+ -DCCL_NAMESPACE_END=}
+)
if(WITH_CYCLES_NETWORK)
add_definitions(-DWITH_NETWORK)
@@ -91,9 +101,11 @@ if(WITH_CYCLES_OSL)
include_directories(${OSL_INCLUDES})
endif()
-add_definitions(-DWITH_OPENCL)
-add_definitions(-DWITH_CUDA)
-add_definitions(-DWITH_MULTI)
+add_definitions(
+ -DWITH_OPENCL
+ -DWITH_CUDA
+ -DWITH_MULTI
+)
include_directories(
SYSTEM
@@ -101,7 +113,8 @@ include_directories(
${OPENIMAGEIO_INCLUDE_DIRS}
${OPENIMAGEIO_INCLUDE_DIRS}/OpenImageIO
${OPENEXR_INCLUDE_DIR}
- ${OPENEXR_INCLUDE_DIRS})
+ ${OPENEXR_INCLUDE_DIRS}
+)
# Subdirectories
diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt
index 8aeaa9b491b..ff109da979f 100644
--- a/intern/cycles/blender/CMakeLists.txt
+++ b/intern/cycles/blender/CMakeLists.txt
@@ -50,8 +50,10 @@ add_definitions(-DGLEW_STATIC)
blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}")
if(APPLE)
- if(${CMAKE_GENERATOR} MATCHES "Xcode" AND ${XCODE_VERSION} VERSION_GREATER 5.0) # avoid link failure with clang 3.4 debug
- SET_TARGET_PROPERTIES(bf_intern_cycles PROPERTIES XCODE_ATTRIBUTE_CLANG_DEBUG_INFORMATION_LEVEL "line-tables-only") # -gline-tables-only
+ # avoid link failure with clang 3.4 debug
+ if(${CMAKE_GENERATOR} MATCHES "Xcode" AND ${XCODE_VERSION} VERSION_GREATER 5.0)
+ # -gline-tables-only
+ set_target_properties(bf_intern_cycles PROPERTIES XCODE_ATTRIBUTE_CLANG_DEBUG_INFORMATION_LEVEL "line-tables-only")
endif()
endif()
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index cbe0d4b5d10..794a0f1d4c1 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -144,7 +144,9 @@ if(WITH_CYCLES_CUDA_BINARIES)
# warn for other versions
if(CUDA_VERSION MATCHES "50")
else()
- message(WARNING "CUDA version ${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} detected, build may succeed but only CUDA 5.0 is officially supported")
+ message(WARNING
+ "CUDA version ${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} detected, "
+ "build may succeed but only CUDA 5.0 is officially supported")
endif()
# build for each arch
@@ -172,7 +174,21 @@ if(WITH_CYCLES_CUDA_BINARIES)
else()
add_custom_command(
OUTPUT ${cuda_cubin}
- COMMAND ${CUDA_NVCC_EXECUTABLE} -arch=${arch} -m${CUDA_BITS} --cubin ${CMAKE_CURRENT_SOURCE_DIR}/kernel.cu -o ${CMAKE_CURRENT_BINARY_DIR}/${cuda_cubin} --ptxas-options="-v" ${cuda_arch_flags} ${cuda_version_flags} ${cuda_math_flags} -I${CMAKE_CURRENT_SOURCE_DIR}/../util -I${CMAKE_CURRENT_SOURCE_DIR}/svm -DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END= -DNVCC
+ COMMAND ${CUDA_NVCC_EXECUTABLE}
+ -arch=${arch}
+ -m${CUDA_BITS}
+ --cubin ${CMAKE_CURRENT_SOURCE_DIR}/kernel.cu
+ -o ${CMAKE_CURRENT_BINARY_DIR}/${cuda_cubin}
+ --ptxas-options="-v"
+ ${cuda_arch_flags}
+ ${cuda_version_flags}
+ ${cuda_math_flags}
+ -I${CMAKE_CURRENT_SOURCE_DIR}/../util
+ -I${CMAKE_CURRENT_SOURCE_DIR}/svm
+ -DCCL_NAMESPACE_BEGIN=
+ -DCCL_NAMESPACE_END=
+ -DNVCC
+
DEPENDS ${cuda_sources})
delayed_install("${CMAKE_CURRENT_BINARY_DIR}" "${cuda_cubin}" ${CYCLES_INSTALL_PATH}/lib)