--- FindBoost.cmake.orig 2014-02-05 16:04:47.724575402 -0700 +++ FindBoost.cmake 2014-02-05 16:08:39.877376524 -0700 @@ -907,7 +907,11 @@ set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)") if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python") # Get version of Python. - execute_process(COMMAND python -c "import sys; sys.stdout.write('.'.join(str(x) for x in sys.version_info[:2]))" OUTPUT_VARIABLE _python_version) + if (NOT PYTHON_EXECUTABLE) + #if a certain version of python was detected by cmake before use that one + set(PYTHON_EXECUTABLE "python") + endif (NOT PYTHON_EXECUTABLE) + execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import sys; sys.stdout.write('.'.join(str(x) for x in sys.version_info[:2]))" OUTPUT_VARIABLE _python_version) endif()