CMake: Give kernel compilation targets access to console
Done by passing USES_TERMINAL to the add_custom_command(). This allows to see sub-command messages early on, before they are finished executing. This should help buildbots to "see" that the kernels are still being compiled and not kill the build because it did not output anything in a long time. Pull Request: https://projects.blender.org/blender/blender/pulls/114327
This commit is contained in:
parent
2893dc8ab7
commit
4b891b4afe
@ -504,12 +504,14 @@ if(WITH_CYCLES_CUDA_BINARIES)
|
|||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${cuda_file}
|
OUTPUT ${cuda_file}
|
||||||
COMMAND ${CCACHE_PROGRAM} ${cuda_nvcc_executable} ${_cuda_nvcc_args}
|
COMMAND ${CCACHE_PROGRAM} ${cuda_nvcc_executable} ${_cuda_nvcc_args}
|
||||||
DEPENDS ${kernel_sources})
|
DEPENDS ${kernel_sources}
|
||||||
|
USES_TERMINAL)
|
||||||
else()
|
else()
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${cuda_file}
|
OUTPUT ${cuda_file}
|
||||||
COMMAND ${cuda_nvcc_executable} ${_cuda_nvcc_args}
|
COMMAND ${cuda_nvcc_executable} ${_cuda_nvcc_args}
|
||||||
DEPENDS ${kernel_sources})
|
DEPENDS ${kernel_sources}
|
||||||
|
USES_TERMINAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
unset(_cuda_nvcc_args)
|
unset(_cuda_nvcc_args)
|
||||||
@ -646,7 +648,8 @@ if(WITH_CYCLES_HIP_BINARIES AND WITH_CYCLES_DEVICE_HIP)
|
|||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${hip_file}
|
OUTPUT ${hip_file}
|
||||||
COMMAND ${hip_command} ${hip_flags}
|
COMMAND ${hip_command} ${hip_flags}
|
||||||
DEPENDS ${kernel_sources})
|
DEPENDS ${kernel_sources}
|
||||||
|
USES_TERMINAL)
|
||||||
delayed_install("${CMAKE_CURRENT_BINARY_DIR}" "${hip_file}" ${CYCLES_INSTALL_PATH}/lib)
|
delayed_install("${CMAKE_CURRENT_BINARY_DIR}" "${hip_file}" ${CYCLES_INSTALL_PATH}/lib)
|
||||||
list(APPEND hip_fatbins ${hip_file})
|
list(APPEND hip_fatbins ${hip_file})
|
||||||
endmacro()
|
endmacro()
|
||||||
@ -714,7 +717,8 @@ if(WITH_CYCLES_DEVICE_HIPRT AND WITH_CYCLES_HIP_BINARIES)
|
|||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${bitcode_file}
|
OUTPUT ${bitcode_file}
|
||||||
COMMAND ${hiprt_compile_command} ${hiprt_compile_flags}
|
COMMAND ${hiprt_compile_command} ${hiprt_compile_flags}
|
||||||
DEPENDS ${kernel_sources})
|
DEPENDS ${kernel_sources}
|
||||||
|
USES_TERMINAL)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(hiprt_link_command ${CMAKE_COMMAND})
|
set(hiprt_link_command ${CMAKE_COMMAND})
|
||||||
set(hiprt_link_flags -E env "HIP_PATH=${HIP_ROOT_DIR}"
|
set(hiprt_link_flags -E env "HIP_PATH=${HIP_ROOT_DIR}"
|
||||||
@ -734,7 +738,8 @@ if(WITH_CYCLES_DEVICE_HIPRT AND WITH_CYCLES_HIP_BINARIES)
|
|||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${hiprt_file}
|
OUTPUT ${hiprt_file}
|
||||||
COMMAND ${hiprt_link_command} ${hiprt_link_flags}
|
COMMAND ${hiprt_link_command} ${hiprt_link_flags}
|
||||||
DEPENDS ${bitcode_file})
|
DEPENDS ${bitcode_file}
|
||||||
|
USES_TERMINAL)
|
||||||
delayed_install("${CMAKE_CURRENT_BINARY_DIR}" "${hiprt_file}" ${CYCLES_INSTALL_PATH}/lib)
|
delayed_install("${CMAKE_CURRENT_BINARY_DIR}" "${hiprt_file}" ${CYCLES_INSTALL_PATH}/lib)
|
||||||
add_custom_target(cycles_kernel_hiprt ALL DEPENDS ${hiprt_file})
|
add_custom_target(cycles_kernel_hiprt ALL DEPENDS ${hiprt_file})
|
||||||
cycles_set_solution_folder(cycles_kernel_hiprt)
|
cycles_set_solution_folder(cycles_kernel_hiprt)
|
||||||
@ -785,7 +790,8 @@ if(WITH_CYCLES_DEVICE_OPTIX AND WITH_CYCLES_CUDA_BINARIES)
|
|||||||
${cuda_flags}
|
${cuda_flags}
|
||||||
${input}
|
${input}
|
||||||
WORKING_DIRECTORY
|
WORKING_DIRECTORY
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}")
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
USES_TERMINAL)
|
||||||
|
|
||||||
list(APPEND optix_ptx ${output})
|
list(APPEND optix_ptx ${output})
|
||||||
|
|
||||||
@ -1044,7 +1050,8 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
|
|||||||
"$<$<CONFIG:Debug>:${sycl_compiler_flags_Debug}>"
|
"$<$<CONFIG:Debug>:${sycl_compiler_flags_Debug}>"
|
||||||
"$<$<CONFIG:MinSizeRel>:${sycl_compiler_flags_Release}>"
|
"$<$<CONFIG:MinSizeRel>:${sycl_compiler_flags_Release}>"
|
||||||
COMMAND_EXPAND_LISTS
|
COMMAND_EXPAND_LISTS
|
||||||
DEPENDS ${cycles_oneapi_kernel_sources})
|
DEPENDS ${cycles_oneapi_kernel_sources}
|
||||||
|
USES_TERMINAL)
|
||||||
else()
|
else()
|
||||||
if(NOT IGC_INSTALL_DIR)
|
if(NOT IGC_INSTALL_DIR)
|
||||||
get_filename_component(IGC_INSTALL_DIR "${sycl_compiler_root}/../lib/igc" ABSOLUTE)
|
get_filename_component(IGC_INSTALL_DIR "${sycl_compiler_root}/../lib/igc" ABSOLUTE)
|
||||||
@ -1069,7 +1076,8 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
|
|||||||
"$<$<CONFIG:Debug>:${sycl_compiler_flags_Debug_str}>"
|
"$<$<CONFIG:Debug>:${sycl_compiler_flags_Debug_str}>"
|
||||||
"$<$<CONFIG:MinSizeRel>:${sycl_compiler_flags_Release_str}>"
|
"$<$<CONFIG:MinSizeRel>:${sycl_compiler_flags_Release_str}>"
|
||||||
COMMAND_EXPAND_LISTS
|
COMMAND_EXPAND_LISTS
|
||||||
DEPENDS ${cycles_oneapi_kernel_sources})
|
DEPENDS ${cycles_oneapi_kernel_sources}
|
||||||
|
USES_TERMINAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT WITH_BLENDER)
|
if(NOT WITH_BLENDER)
|
||||||
|
Loading…
Reference in New Issue
Block a user