Skip to content

Commit

Permalink
cmake: fix Ninja generator warning about pylintrc
Browse files Browse the repository at this point in the history
CMake generated files is a part of target depends list.
Details: `cmake --help-policy CMP0058`
  • Loading branch information
alalek committed Apr 10, 2018
1 parent a68ffc8 commit 5e03011
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/OpenCVPylint.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ function(ocv_pylint_finalize)
return()
endif()

file(COPY "${CMAKE_SOURCE_DIR}/platforms/scripts/pylintrc" DESTINATION "${CMAKE_BINARY_DIR}")
add_custom_command(
OUTPUT "${CMAKE_BINARY_DIR}/pylintrc"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/platforms/scripts/pylintrc" "${CMAKE_BINARY_DIR}/pylintrc"
DEPENDS "${CMAKE_SOURCE_DIR}/platforms/scripts/pylintrc"
)

set(PYLINT_CONFIG_SCRIPT "")
ocv_cmake_script_append_var(PYLINT_CONFIG_SCRIPT
Expand Down

0 comments on commit 5e03011

Please sign in to comment.