1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-18 11:09:56 +00:00

Find Python 3 with CMake < 3.12

This commit is contained in:
Carles Fernandez 2019-11-30 17:42:44 +01:00
parent 4d1759bf9a
commit b552616b99
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,8 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
else()
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python3")
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python2.7 to build for python 2.7")
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python to build for python 2.7")
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8 3.9)
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN3_VERSION})
if(NOT PYTHONINTERP_FOUND)
message(STATUS "python3 not found - trying with python2.7")

View File

@ -71,6 +71,7 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
else()
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python3")
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python to build for python 2.7")
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8 3.9)
find_package(PythonInterp ${VOLK_PYTHON_MIN3_VERSION})
if(NOT PYTHONINTERP_FOUND)
message(STATUS "python3 not found - trying with python2.7")