Open Source Computer Vision Library
https://opencv.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
889 B
23 lines
889 B
# ---------------------------------------------------------------------------- |
|
# CMake file to run pylint on the tutorial python files. |
|
# |
|
# ---------------------------------------------------------------------------- |
|
include(${CMAKE_SOURCE_DIR}/cmake/FindPylint.cmake) |
|
|
|
project(run_pylint_on_tutorials) |
|
|
|
if(PYLINT_FOUND) |
|
message(STATUS "pylint version: ${PYLINT_VERSION}") |
|
set(curdir "${CMAKE_CURRENT_SOURCE_DIR}") |
|
file(GLOB_RECURSE PYTHON_SCRIPTS ${curdir}/*.py) |
|
add_custom_target("${PROJECT_NAME}") |
|
|
|
foreach(SCRIPT ${PYTHON_SCRIPTS}) |
|
get_filename_component(SCRIPT_NAME ${SCRIPT} NAME_WE) |
|
add_custom_command(TARGET "${PROJECT_NAME}" |
|
COMMAND ${PYLINT_EXECUTABLE} ${SCRIPT} |
|
--rcfile=${curdir}/pylintrc |
|
COMMENT "Running pylint on : ${SCRIPT_NAME}.py" |
|
) |
|
endforeach() |
|
endif()
|
|
|