Cycles: Reduce scope of some defines set in CMakeLists
Should be no functional changes at all, just speeds up re-compilation when some features needs to be disabled for development purposes. For example, when running lots of Valgrind it's handy to disable any GPU devices because otherwise you'll be wasting quite some time in the driver while enumerating devices. Reviewers: dingto, lukasstockner97, brecht, juicyfruit Differential Revision: https://developer.blender.org/D1730
This commit is contained in:
@@ -126,10 +126,6 @@ add_definitions(
|
||||
-DCCL_NAMESPACE_END=}
|
||||
)
|
||||
|
||||
if(WITH_CYCLES_NETWORK)
|
||||
add_definitions(-DWITH_NETWORK)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_STANDALONE_GUI)
|
||||
add_definitions(-DWITH_CYCLES_STANDALONE_GUI)
|
||||
endif()
|
||||
@@ -138,10 +134,6 @@ if(WITH_CYCLES_PTEX)
|
||||
add_definitions(-DWITH_PTEX)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_OPENSUBDIV)
|
||||
add_definitions(-DWITH_OPENSUBDIV)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_OSL)
|
||||
add_definitions(-DWITH_OSL)
|
||||
add_definitions(-DOSL_STATIC_LIBRARY)
|
||||
@@ -151,11 +143,9 @@ if(WITH_CYCLES_OSL)
|
||||
)
|
||||
endif()
|
||||
|
||||
add_definitions(
|
||||
-DWITH_OPENCL
|
||||
-DWITH_CUDA
|
||||
-DWITH_MULTI
|
||||
)
|
||||
set(WITH_CYCLES_DEVICE_OPENCL TRUE)
|
||||
set(WITH_CYCLES_DEVICE_CUDA TRUE)
|
||||
set(WITH_CYCLES_DEVICE_MULTI TRUE)
|
||||
|
||||
if(CYCLES_STANDALONE_REPOSITORY)
|
||||
TEST_UNORDERED_MAP_SUPPORT()
|
||||
|
@@ -52,6 +52,10 @@ set(ADDON_FILES
|
||||
|
||||
add_definitions(${GL_DEFINITIONS})
|
||||
|
||||
if(WITH_CYCLES_NETWORK)
|
||||
add_definitions(-DWITH_NETWORK)
|
||||
endif()
|
||||
|
||||
blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}")
|
||||
|
||||
# avoid link failure with clang 3.4 debug
|
||||
|
@@ -46,6 +46,18 @@ set(SRC_HEADERS
|
||||
)
|
||||
|
||||
add_definitions(${GL_DEFINITIONS})
|
||||
if(WITH_CYCLES_NETWORK)
|
||||
add_definitions(-DWITH_NETWORK)
|
||||
endif()
|
||||
if(WITH_CYCLES_DEVICE_OPENCL)
|
||||
add_definitions(-DWITH_OPENCL)
|
||||
endif()
|
||||
if(WITH_CYCLES_DEVICE_CUDA)
|
||||
add_definitions(-DWITH_CUDA)
|
||||
endif()
|
||||
if(WITH_CYCLES_DEVICE_MULTI)
|
||||
add_definitions(-DWITH_MULTI)
|
||||
endif()
|
||||
|
||||
include_directories(${INC})
|
||||
include_directories(SYSTEM ${INC_SYS})
|
||||
|
@@ -25,6 +25,10 @@ set(SRC_HEADERS
|
||||
subd_split.h
|
||||
)
|
||||
|
||||
if(WITH_CYCLES_OPENSUBDIV)
|
||||
add_definitions(-DWITH_OPENSUBDIV)
|
||||
endif()
|
||||
|
||||
include_directories(${INC})
|
||||
include_directories(SYSTEM ${INC_SYS})
|
||||
|
||||
|
Reference in New Issue
Block a user