mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-16 21:20:34 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into next
This commit is contained in:
commit
0dafe6e1ad
@ -568,9 +568,6 @@ if(NOT VOLK_GNSSSDR_FOUND)
|
|||||||
# Find Python required modules
|
# Find Python required modules
|
||||||
###############################
|
###############################
|
||||||
include(SetupPython) # sets PYTHON_EXECUTABLE and search for required modules
|
include(SetupPython) # sets PYTHON_EXECUTABLE and search for required modules
|
||||||
GNSSSDR_PYTHON_CHECK_MODULE("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
|
||||||
GNSSSDR_PYTHON_CHECK_MODULE("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
|
||||||
GNSSSDR_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
|
||||||
|
|
||||||
if(NOT PYTHON_MIN_VER_FOUND)
|
if(NOT PYTHON_MIN_VER_FOUND)
|
||||||
message(FATAL_ERROR "Python ${GNSSSDR_PYTHON_MIN_VERSION} or greater required to build VOLK_GNSSSDR")
|
message(FATAL_ERROR "Python ${GNSSSDR_PYTHON_MIN_VERSION} or greater required to build VOLK_GNSSSDR")
|
||||||
|
@ -16,46 +16,6 @@
|
|||||||
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# Setup the python interpreter:
|
|
||||||
# This allows the user to specify a specific interpreter,
|
|
||||||
# or finds the interpreter via the built-in cmake module.
|
|
||||||
########################################################################
|
|
||||||
|
|
||||||
if (PYTHON_EXECUTABLE)
|
|
||||||
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
|
||||||
string(FIND "${PYTHON_EXECUTABLE}" "python3" IS_PYTHON3)
|
|
||||||
if(IS_PYTHON3 EQUAL -1)
|
|
||||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION} REQUIRED)
|
|
||||||
else(IS_PYTHON3 EQUAL -1)
|
|
||||||
find_package(PythonInterp ${GNSSSDR_PYTHON3_MIN_VERSION} REQUIRED)
|
|
||||||
endif(IS_PYTHON3 EQUAL -1)
|
|
||||||
else (PYTHON_EXECUTABLE)
|
|
||||||
message(STATUS "PYTHON_EXECUTABLE not set - using default python2")
|
|
||||||
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.")
|
|
||||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION})
|
|
||||||
if(NOT PYTHONINTERP_FOUND)
|
|
||||||
message(STATUS "python2 not found - trying with python3")
|
|
||||||
find_package(PythonInterp ${GNSSSDR_PYTHON3_MIN_VERSION} REQUIRED)
|
|
||||||
endif(NOT PYTHONINTERP_FOUND)
|
|
||||||
endif (PYTHON_EXECUTABLE)
|
|
||||||
|
|
||||||
if (${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
|
|
||||||
set(PYTHON3 TRUE)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT)
|
|
||||||
|
|
||||||
if (CMAKE_CROSSCOMPILING)
|
|
||||||
set(QA_PYTHON_EXECUTABLE "/usr/bin/python")
|
|
||||||
else (CMAKE_CROSSCOMPILING)
|
|
||||||
set(QA_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
|
|
||||||
endif(CMAKE_CROSSCOMPILING)
|
|
||||||
|
|
||||||
#make the path to the executable appear in the cmake gui
|
|
||||||
set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter")
|
|
||||||
set(QA_PYTHON_EXECUTABLE ${QA_PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter for QA tests")
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Check for the existence of a python module:
|
# Check for the existence of a python module:
|
||||||
# - desc a string description of the check
|
# - desc a string description of the check
|
||||||
@ -90,3 +50,72 @@ except: pass
|
|||||||
#########################################"
|
#########################################"
|
||||||
"${have}")
|
"${have}")
|
||||||
endmacro(GNSSSDR_PYTHON_CHECK_MODULE)
|
endmacro(GNSSSDR_PYTHON_CHECK_MODULE)
|
||||||
|
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# Setup the python interpreter:
|
||||||
|
# This allows the user to specify a specific interpreter,
|
||||||
|
# or finds the interpreter via the built-in cmake module.
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||||
|
if(PYTHON_EXECUTABLE)
|
||||||
|
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
||||||
|
string(FIND "${PYTHON_EXECUTABLE}" "python3" IS_PYTHON3)
|
||||||
|
if(IS_PYTHON3 EQUAL -1)
|
||||||
|
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION} REQUIRED)
|
||||||
|
else(IS_PYTHON3 EQUAL -1)
|
||||||
|
find_package(PythonInterp ${GNSSSDR_PYTHON3_MIN_VERSION} REQUIRED)
|
||||||
|
endif(IS_PYTHON3 EQUAL -1)
|
||||||
|
GNSSSDR_PYTHON_CHECK_MODULE("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||||
|
GNSSSDR_PYTHON_CHECK_MODULE("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||||
|
GNSSSDR_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||||
|
else(PYTHON_EXECUTABLE)
|
||||||
|
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python2")
|
||||||
|
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python3 to build for python3.")
|
||||||
|
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION})
|
||||||
|
if(NOT PYTHONINTERP_FOUND)
|
||||||
|
message(STATUS "python2 not found - trying with python3")
|
||||||
|
find_package(PythonInterp ${GNSSSDR_PYTHON3_MIN_VERSION} REQUIRED)
|
||||||
|
endif(NOT PYTHONINTERP_FOUND)
|
||||||
|
GNSSSDR_PYTHON_CHECK_MODULE("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||||
|
GNSSSDR_PYTHON_CHECK_MODULE("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||||
|
GNSSSDR_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||||
|
endif(PYTHON_EXECUTABLE)
|
||||||
|
find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT)
|
||||||
|
else(CMAKE_VERSION VERSION_LESS 3.12)
|
||||||
|
find_package (Python3 COMPONENTS Interpreter Development)
|
||||||
|
if(Python3_FOUND)
|
||||||
|
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
||||||
|
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
|
||||||
|
GNSSSDR_PYTHON_CHECK_MODULE("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||||
|
GNSSSDR_PYTHON_CHECK_MODULE("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||||
|
GNSSSDR_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||||
|
endif(Python3_FOUND)
|
||||||
|
if(NOT Python3_FOUND OR NOT MAKO_FOUND OR NOT SIX_FOUND)
|
||||||
|
find_package(Python2 COMPONENTS Interpreter Development)
|
||||||
|
if(Python2_FOUND)
|
||||||
|
set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE})
|
||||||
|
set(PYTHON_VERSION_MAJOR ${Python2_VERSION_MAJOR})
|
||||||
|
GNSSSDR_PYTHON_CHECK_MODULE("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||||
|
GNSSSDR_PYTHON_CHECK_MODULE("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||||
|
GNSSSDR_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||||
|
endif(Python2_FOUND)
|
||||||
|
endif(NOT Python3_FOUND OR NOT MAKO_FOUND OR NOT SIX_FOUND)
|
||||||
|
endif(CMAKE_VERSION VERSION_LESS 3.12)
|
||||||
|
|
||||||
|
if(${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
|
||||||
|
set(PYTHON3 TRUE)
|
||||||
|
endif(${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
|
||||||
|
|
||||||
|
|
||||||
|
if(CMAKE_CROSSCOMPILING)
|
||||||
|
set(QA_PYTHON_EXECUTABLE "/usr/bin/python")
|
||||||
|
else(CMAKE_CROSSCOMPILING)
|
||||||
|
set(QA_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||||
|
endif(CMAKE_CROSSCOMPILING)
|
||||||
|
|
||||||
|
|
||||||
|
#make the path to the executable appear in the cmake gui
|
||||||
|
set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter")
|
||||||
|
set(QA_PYTHON_EXECUTABLE ${QA_PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter for QA tests")
|
||||||
|
@ -61,6 +61,8 @@ set(Boost_ADDITIONAL_VERSIONS
|
|||||||
"1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59"
|
"1.55.0" "1.55" "1.56.0" "1.56" "1.57.0" "1.57" "1.58.0" "1.58" "1.59.0" "1.59"
|
||||||
"1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64"
|
"1.60.0" "1.60" "1.61.0" "1.61" "1.62.0" "1.62" "1.63.0" "1.63" "1.64.0" "1.64"
|
||||||
"1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69"
|
"1.65.0" "1.65" "1.66.0" "1.66" "1.67.0" "1.67" "1.68.0" "1.68" "1.69.0" "1.69"
|
||||||
|
"1.70.0" "1.70" "1.71.0" "1.71" "1.72.0" "1.72" "1.73.0" "1.73" "1.74.0" "1.74"
|
||||||
|
"1.75.0" "1.75" "1.76.0" "1.76" "1.77.0" "1.77" "1.78.0" "1.78" "1.79.0" "1.79"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Boost 1.52 disabled, see https://svn.boost.org/trac/boost/ticket/7669
|
# Boost 1.52 disabled, see https://svn.boost.org/trac/boost/ticket/7669
|
||||||
|
@ -27,6 +27,8 @@ set(__INCLUDED_VOLK_PYTHON_CMAKE TRUE)
|
|||||||
########################################################################
|
########################################################################
|
||||||
set(VOLK_PYTHON_MIN_VERSION "2.7")
|
set(VOLK_PYTHON_MIN_VERSION "2.7")
|
||||||
set(VOLK_PYTHON3_MIN_VERSION "3.4")
|
set(VOLK_PYTHON3_MIN_VERSION "3.4")
|
||||||
|
|
||||||
|
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||||
if(PYTHON_EXECUTABLE)
|
if(PYTHON_EXECUTABLE)
|
||||||
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
||||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
||||||
@ -39,12 +41,23 @@ else (PYTHON_EXECUTABLE)
|
|||||||
find_package(PythonInterp ${VOLK_PYTHON3_MIN_VERSION} REQUIRED)
|
find_package(PythonInterp ${VOLK_PYTHON3_MIN_VERSION} REQUIRED)
|
||||||
endif(NOT PYTHONINTERP_FOUND)
|
endif(NOT PYTHONINTERP_FOUND)
|
||||||
endif(PYTHON_EXECUTABLE)
|
endif(PYTHON_EXECUTABLE)
|
||||||
|
find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT)
|
||||||
|
else(CMAKE_VERSION VERSION_LESS 3.12)
|
||||||
|
if(PYTHON_EXECUTABLE)
|
||||||
|
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
||||||
|
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
||||||
|
else(PYTHON_EXECUTABLE)
|
||||||
|
find_package (Python COMPONENTS Interpreter Development)
|
||||||
|
set(PYTHON_VERSION_MAJOR ${Python_VERSION_MAJOR})
|
||||||
|
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
|
||||||
|
endif(PYTHON_EXECUTABLE)
|
||||||
|
endif(CMAKE_VERSION VERSION_LESS 3.12)
|
||||||
|
|
||||||
if (${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
|
if (${PYTHON_VERSION_MAJOR} VERSION_EQUAL 3)
|
||||||
set(PYTHON3 TRUE)
|
set(PYTHON3 TRUE)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT)
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Check for the existence of a python module:
|
# Check for the existence of a python module:
|
||||||
|
Loading…
Reference in New Issue
Block a user