From 9c1dfd244f2bbab5f1a9038d545612768cd527c6 Mon Sep 17 00:00:00 2001 From: Matthew Broadway Date: Thu, 14 Feb 2019 10:55:16 +0000 Subject: [PATCH] fixed a bug where unsetting the cached python version leads to different numpy/cython/libraries being used --- cmake/GtsamCythonWrap.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/GtsamCythonWrap.cmake b/cmake/GtsamCythonWrap.cmake index f329d31ab..374e00c46 100644 --- a/cmake/GtsamCythonWrap.cmake +++ b/cmake/GtsamCythonWrap.cmake @@ -7,8 +7,10 @@ unset(PYTHON_INCLUDE_DIR CACHE) unset(PYTHON_MAJOR_VERSION CACHE) if(GTSAM_PYTHON_VERSION STREQUAL "Default") + find_package(PythonInterp REQUIRED) find_package(PythonLibs REQUIRED) else() + find_package(PythonInterp ${GTSAM_PYTHON_VERSION} EXACT REQUIRED) find_package(PythonLibs ${GTSAM_PYTHON_VERSION} EXACT REQUIRED) endif() find_package(Cython 0.25.2 REQUIRED)