Skip to content

Commit

Permalink
cmake: fix Pylint version detection
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Aug 28, 2017
1 parent 8ffa294 commit 537ab13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/FindPylint.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ find_host_program(PYLINT_EXECUTABLE pylint PATHS /usr/bin)

if(PYLINT_EXECUTABLE)
execute_process(COMMAND ${PYLINT_EXECUTABLE} --version OUTPUT_VARIABLE PYLINT_VERSION_RAW ERROR_QUIET)
if (PYLINT_VERSION_RAW)
string(REGEX REPLACE "^pylint ([0-9]+.[0-9]+.[0-9]+),.*" "\\1" PYLINT_VERSION ${PYLINT_VERSION_RAW})
if(PYLINT_VERSION_RAW MATCHES "pylint([^,]*) ([0-9\\.]+[0-9])")
set(PYLINT_VERSION "${CMAKE_MATCH_2}")
else()
set(PYLINT_VERSION "unknown")
endif()
Expand Down

0 comments on commit 537ab13

Please sign in to comment.