Skip to content

Commit

Permalink
Build: Require exact version if PYTHON_VERSION is specified (#1286)
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Nov 2, 2020
1 parent 5b9da09 commit f4f8322
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cmake/pythonutils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ macro (find_python)

# Attempt to find the desired version, but fall back to other
# additional versions.
unset (_req)
if (USE_PYTHON)
set (_req REQUIRED)
else ()
unset (_req)
if (PYTHON_VERSION)
list (APPEND _req EXACT)
endif ()
endif ()
checked_find_package (Python ${PYTHON_VERSION}
${_req}
Expand Down

0 comments on commit f4f8322

Please sign in to comment.