tests: Switch from PYTHON_EXECUTABLE to PYTHON_DEFAULT_EXECUTABLE

The DetectPython cmake script now outputs a default python executable.
Updated other cmake scripts to use this concept.  Used default where
python2/3 will work, use explicit PYTHON2/3_EXECUTABLE where an
explicit version is needed.  Also, fail if python is required and NO
version of python was found.

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2016-10-05 17:08:42 -07:00
parent edd8df4c50
commit c6610bdf46
3 changed files with 59 additions and 37 deletions

View File

@ -442,7 +442,7 @@ endmacro(upm_module_init)
if (BUILDDOC AND BUILDSWIGPYTHON)
# doxy2swig the doxygen output
add_custom_target (pyupm_doxy2swig ALL
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/doxy2swig.py
COMMAND ${PYTHON2_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/doxy2swig.py
${CMAKE_BINARY_DIR}/xml/index.xml
${CMAKE_CURRENT_BINARY_DIR}/pyupm_doxy2swig.i
DEPENDS doc)