X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/7cf9d459d6ccb91d7efdce13d5b33d331e47c127..d9998bfab321bce44d35fcaa881fe682e66714d8:/CMakeLists.txt?ds=inline diff --git a/CMakeLists.txt b/CMakeLists.txt index 88565238..761531b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,6 +140,8 @@ if (BUILD_TESTS) set(TEST_BDD db osm2pgsql api) + find_program(PYLINT NAMES pylint3 pylint) + foreach (test ${TEST_BDD}) add_test(NAME bdd_${test} COMMAND behave ${test} @@ -156,9 +158,14 @@ if (BUILD_TESTS) COMMAND phpcs --report-width=120 --colors lib website utils WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) - add_test(NAME pylint - COMMAND pylint3 nominatim - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) + if (PYLINT) + message(STATUS "Using '${PYLINT}' for Python linting.") + add_test(NAME pylint + COMMAND ${PYLINT} nominatim + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) + else() + message(STATUS "pylint not found. Linting tests disabled.") + endif() endif() #-----------------------------------------------------------------------------