diff options
Diffstat (limited to 'intern/cycles/kernel/CMakeLists.txt')
-rw-r--r-- | intern/cycles/kernel/CMakeLists.txt | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt index c39c67afb5a..f6b4b963a7a 100644 --- a/intern/cycles/kernel/CMakeLists.txt +++ b/intern/cycles/kernel/CMakeLists.txt @@ -423,7 +423,7 @@ if(WITH_CYCLES_CUDA_BINARIES) set(cuda_kernel_src "/kernels/cuda/${name}.cu") - set(cuda_flags + set(cuda_flags ${flags} -D CCL_NAMESPACE_BEGIN= -D CCL_NAMESPACE_END= -D NVCC @@ -545,11 +545,11 @@ endif() # OptiX PTX modules if(WITH_CYCLES_DEVICE_OPTIX AND WITH_CYCLES_CUDA_BINARIES) - foreach(input ${SRC_OPTIX_KERNELS}) - get_filename_component(input_we ${input} NAME_WE) + macro(CYCLES_OPTIX_KERNEL_ADD name flags) + set(input "kernels/optix/kernel_optix.cu") + set(output "${CMAKE_CURRENT_BINARY_DIR}/${name}.ptx") - set(output "${CMAKE_CURRENT_BINARY_DIR}/${input_we}.ptx") - set(cuda_flags + set(cuda_flags ${flags} -I "${OPTIX_INCLUDE_DIR}" -I "${CMAKE_CURRENT_SOURCE_DIR}/.." -I "${CMAKE_CURRENT_SOURCE_DIR}/kernels/cuda" @@ -625,7 +625,10 @@ if(WITH_CYCLES_DEVICE_OPTIX AND WITH_CYCLES_CUDA_BINARIES) list(APPEND optix_ptx ${output}) delayed_install("${CMAKE_CURRENT_BINARY_DIR}" "${output}" ${CYCLES_INSTALL_PATH}/lib) - endforeach() + endmacro() + + CYCLES_OPTIX_KERNEL_ADD(kernel_optix "-D __NO_SHADER_RAYTRACE__") + CYCLES_OPTIX_KERNEL_ADD(kernel_optix_shader_raytrace "--keep-device-functions") add_custom_target(cycles_kernel_optix ALL DEPENDS ${optix_ptx}) cycles_set_solution_folder(cycles_kernel_optix) |