Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/device/CMakeLists.txt
| Show All 37 Lines | |||||
| if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD) | if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD) | ||||
| list(APPEND INC | list(APPEND INC | ||||
| ../../../extern/hipew/include | ../../../extern/hipew/include | ||||
| ) | ) | ||||
| add_definitions(-DWITH_HIP_DYNLOAD) | add_definitions(-DWITH_HIP_DYNLOAD) | ||||
| endif() | endif() | ||||
| set(SRC | set(SRC_BASE | ||||
| device.cpp | device.cpp | ||||
| denoise.cpp | denoise.cpp | ||||
| graphics_interop.cpp | graphics_interop.cpp | ||||
| kernel.cpp | kernel.cpp | ||||
| memory.cpp | memory.cpp | ||||
| queue.cpp | queue.cpp | ||||
| ) | ) | ||||
| ▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | set(SRC_DUMMY | ||||
| dummy/device.h | dummy/device.h | ||||
| ) | ) | ||||
| set(SRC_MULTI | set(SRC_MULTI | ||||
| multi/device.cpp | multi/device.cpp | ||||
| multi/device.h | multi/device.h | ||||
| ) | ) | ||||
| set(SRC_METAL | |||||
| metal/bvh.mm | |||||
| metal/bvh.h | |||||
| metal/device.mm | |||||
| metal/device.h | |||||
| metal/device_impl.mm | |||||
| metal/device_impl.h | |||||
| metal/kernel.mm | |||||
| metal/kernel.h | |||||
| metal/queue.mm | |||||
| metal/queue.h | |||||
| metal/util.mm | |||||
| metal/util.h | |||||
| ) | |||||
| set(SRC_OPTIX | set(SRC_OPTIX | ||||
| optix/device.cpp | optix/device.cpp | ||||
| optix/device.h | optix/device.h | ||||
| optix/device_impl.cpp | optix/device_impl.cpp | ||||
| optix/device_impl.h | optix/device_impl.h | ||||
| optix/queue.cpp | optix/queue.cpp | ||||
| optix/queue.h | optix/queue.h | ||||
| optix/util.h | optix/util.h | ||||
| ) | ) | ||||
| set(SRC_HEADERS | set(SRC_HEADERS | ||||
| device.h | device.h | ||||
| denoise.h | denoise.h | ||||
| graphics_interop.h | graphics_interop.h | ||||
| memory.h | memory.h | ||||
| kernel.h | kernel.h | ||||
| queue.h | queue.h | ||||
| ) | ) | ||||
| set(SRC | |||||
| ${SRC_BASE} | |||||
| ${SRC_CPU} | |||||
| ${SRC_CUDA} | |||||
| ${SRC_HIP} | |||||
| ${SRC_DUMMY} | |||||
| ${SRC_MULTI} | |||||
| ${SRC_OPTIX} | |||||
| ${SRC_HEADERS} | |||||
| ) | |||||
| set(LIB | set(LIB | ||||
| cycles_kernel | cycles_kernel | ||||
| cycles_util | cycles_util | ||||
| ${CYCLES_GL_LIBRARIES} | ${CYCLES_GL_LIBRARIES} | ||||
| ) | ) | ||||
| if(WITH_CYCLES_DEVICE_OPTIX OR WITH_CYCLES_DEVICE_CUDA) | if(WITH_CYCLES_DEVICE_OPTIX OR WITH_CYCLES_DEVICE_CUDA) | ||||
| if(WITH_CUDA_DYNLOAD) | if(WITH_CUDA_DYNLOAD) | ||||
| Show All 19 Lines | if(WITH_CYCLES_DEVICE_CUDA) | ||||
| add_definitions(-DWITH_CUDA) | add_definitions(-DWITH_CUDA) | ||||
| endif() | endif() | ||||
| if(WITH_CYCLES_DEVICE_HIP) | if(WITH_CYCLES_DEVICE_HIP) | ||||
| add_definitions(-DWITH_HIP) | add_definitions(-DWITH_HIP) | ||||
| endif() | endif() | ||||
| if(WITH_CYCLES_DEVICE_OPTIX) | if(WITH_CYCLES_DEVICE_OPTIX) | ||||
| add_definitions(-DWITH_OPTIX) | add_definitions(-DWITH_OPTIX) | ||||
| endif() | endif() | ||||
| if(WITH_CYCLES_DEVICE_METAL) | |||||
| list(APPEND LIB | |||||
brecht: Could you move this `FIND_LIBRARY` into `cmake/external_libs.cmake`? For consistency with CUDA… | |||||
| ${METAL_LIBRARY} | |||||
| ) | |||||
| add_definitions(-DWITH_METAL) | |||||
| list(APPEND SRC | |||||
| ${SRC_METAL} | |||||
| ) | |||||
| endif() | |||||
| if(WITH_OPENIMAGEDENOISE) | if(WITH_OPENIMAGEDENOISE) | ||||
| list(APPEND LIB | list(APPEND LIB | ||||
| ${OPENIMAGEDENOISE_LIBRARIES} | ${OPENIMAGEDENOISE_LIBRARIES} | ||||
| ) | ) | ||||
| endif() | endif() | ||||
| include_directories(${INC}) | include_directories(${INC}) | ||||
| include_directories(SYSTEM ${INC_SYS}) | include_directories(SYSTEM ${INC_SYS}) | ||||
| cycles_add_library(cycles_device "${LIB}" | cycles_add_library(cycles_device "${LIB}" ${SRC}) | ||||
| ${SRC} | |||||
| ${SRC_CPU} | |||||
| ${SRC_CUDA} | |||||
| ${SRC_HIP} | |||||
| ${SRC_DUMMY} | |||||
| ${SRC_MULTI} | |||||
| ${SRC_OPTIX} | |||||
| ${SRC_HEADERS} | |||||
| ) | |||||
| source_group("cpu" FILES ${SRC_CPU}) | source_group("cpu" FILES ${SRC_CPU}) | ||||
| source_group("cuda" FILES ${SRC_CUDA}) | source_group("cuda" FILES ${SRC_CUDA}) | ||||
| source_group("dummy" FILES ${SRC_DUMMY}) | source_group("dummy" FILES ${SRC_DUMMY}) | ||||
| source_group("multi" FILES ${SRC_MULTI}) | source_group("multi" FILES ${SRC_MULTI}) | ||||
| source_group("metal" FILES ${SRC_METAL}) | |||||
| source_group("optix" FILES ${SRC_OPTIX}) | source_group("optix" FILES ${SRC_OPTIX}) | ||||
| source_group("common" FILES ${SRC} ${SRC_HEADERS}) | source_group("common" FILES ${SRC} ${SRC_HEADERS}) | ||||
Could you move this FIND_LIBRARY into cmake/external_libs.cmake? For consistency with CUDA and HIP.