Handle python2 not being installed, but python3 being present
@@ -45,11 +45,11 @@ endif()
find_package(Python2 COMPONENTS Interpreter Development)
find_package(Python3 COMPONENTS Interpreter Development)
if(TARGET Python2::Python AND TARGET Python3::Python)
- message(NOTICE ": Found Python ${Python2_VERSION} and ${Python3_VERSION}")
+ message(STATUS ": Found Python ${Python2_VERSION} and ${Python3_VERSION}")
elseif(TARGET Python2::Python)
- message(NOTICE ": Found Python ${Python2_VERSION}")
+ message(STATUS ": Found Python ${Python2_VERSION}")
elseif(TARGET Python3::Python)
- message(NOTICE ": Found Python ${Python3_VERSION}")
+ message(STATUS ": Found Python ${Python3_VERSION}")
else()
message(WARNING ": Unable to find python development libraries for python 2 or 3")
return()
@@ -125,9 +125,15 @@ find_package(Boost OPTIONAL_COMPONENTS
set(_pyilmbase_have_perver_boost)
if(PYILMBASE_BOOST_PY2_COMPONENT)
string(TOUPPER ${PYILMBASE_BOOST_PY2_COMPONENT} PYILMBASE_PY2_UPPER)
+else()
+ set(PYILMBASE_BOOST_PY2_COMPONENT python2x_NOTFOUND)
+ set(PYILMBASE_PY2_UPPER PYTHON2X_NOTFOUND)
endif()
if(PYILMBASE_BOOST_PY3_COMPONENT)
string(TOUPPER ${PYILMBASE_BOOST_PY3_COMPONENT} PYILMBASE_PY3_UPPER)
+else()
+ set(PYILMBASE_BOOST_PY3_COMPONENT python3x_NOTFOUND)
+ set(PYILMBASE_PY3_UPPER PYTHON3X_NOTFOUND)
endif()
if(Boost_PYTHON2_FOUND OR Boost_${PYILMBASE_PY2_UPPER}_FOUND)
set(_pyilmbase_have_perver_boost TRUE)
@@ -167,9 +173,9 @@ else()
return()
endif()
endif()
-set(PYILMBASE_PY2_UPPER)
-set(PYILMBASE_PY3_UPPER)
-set(_pyilmbase_have_perver_boost)
+unset(PYILMBASE_PY2_UPPER)
+unset(PYILMBASE_PY3_UPPER)
+unset(_pyilmbase_have_perver_boost)
# unfortunately, we can't use the boost numpy stuff, as that requires a
# version of boost that is newer than is mandated by many active versions
