mirror of
https://github.com/opencv/opencv.git
synced 2025-01-19 06:53:50 +08:00
cmake: cl2cpp change main OUTPUT to .hpp file
To reduce number of unnecessary rebuilds on updates of OpenCL kernels
This commit is contained in:
parent
1114cbf671
commit
146be78390
@ -720,7 +720,7 @@ macro(ocv_glob_module_sources)
|
|||||||
if(cl_kernels)
|
if(cl_kernels)
|
||||||
set(OCL_NAME opencl_kernels_${name})
|
set(OCL_NAME opencl_kernels_${name})
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp" "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.hpp"
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.hpp" "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp"
|
||||||
COMMAND ${CMAKE_COMMAND} "-DMODULE_NAME=${name}" "-DCL_DIR=${CMAKE_CURRENT_LIST_DIR}/src/opencl" "-DOUTPUT=${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp" -P "${OpenCV_SOURCE_DIR}/cmake/cl2cpp.cmake"
|
COMMAND ${CMAKE_COMMAND} "-DMODULE_NAME=${name}" "-DCL_DIR=${CMAKE_CURRENT_LIST_DIR}/src/opencl" "-DOUTPUT=${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp" -P "${OpenCV_SOURCE_DIR}/cmake/cl2cpp.cmake"
|
||||||
DEPENDS ${cl_kernels} "${OpenCV_SOURCE_DIR}/cmake/cl2cpp.cmake")
|
DEPENDS ${cl_kernels} "${OpenCV_SOURCE_DIR}/cmake/cl2cpp.cmake")
|
||||||
ocv_source_group("Src\\opencl\\kernels" FILES ${cl_kernels})
|
ocv_source_group("Src\\opencl\\kernels" FILES ${cl_kernels})
|
||||||
|
Loading…
Reference in New Issue
Block a user