FindPythonLibs fails on non-absolute `PYTHON_EXECUTABLE`
With the below tiny test case, CMake finds Boost and Python correctly. However, CMake prints a warning about an incorrect number of arguments to get_filename_component. I've added debugging code, and it seems that without the call to "FIND_PACKAGE(Boost.." the value of PYTHON_EXECUTABLE will be set to "/usr/bin/python" but with the call to "FIND_PACKAGE(Boost.." the value of PYTHON_EXECUTABLE is instead just set to "python", with no path. That seems to be the cause of the issue. I assume this happens because line 1347 of FindBoost.cmake specifically sets PYTHON_EXECUTABLE to "python". Everything works fine if FindBoost happens after FindPython*. I couldn't spot any warnings about having FindBoost after FindPython* anywhere, so I'm not sure how intentional this is.
CMakeLists.txt
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.11)
PROJECT (test)
FIND_PACKAGE(Boost 1.55 COMPONENTS python)
FIND_PACKAGE(PythonInterp)
FIND_PACKAGE(PythonLibs)
Warning:
CMake Error at /usr/share/cmake/Modules/FindPythonLibs.cmake:66 (get_filename_component): get_filename_component called with incorrect number of arguments
I admit I am running CMake version 3.5.2 which is old, but I can't see this being reported in any other open or closed issue, so I figure I'd at least post it.