Commit: 23fd670c39ac6f631e6826988b65a6f1a99b536d
Author: Campbell Barton
Date:   Thu Mar 13 23:31:06 2014 +1100
https://developer.blender.org/rB23fd670c39ac6f631e6826988b65a6f1a99b536d

Code cleanup: cmake

===================================================================

M       intern/cycles/CMakeLists.txt
M       intern/cycles/blender/CMakeLists.txt
M       intern/cycles/kernel/CMakeLists.txt

===================================================================

diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 5c8d68b..c2f4029 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 8aeaa9b..ff109da 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 cbe0d4b..794a0f1 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)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to