Reputation: 109
In my usr/bin directory, there are 3 executable files for python - python, python27, python36
Which version of python does the python file direct to? What argument should I pass to cmake find_program to get the python 3 version?
Upvotes: 0
Views: 68
Reputation: 65936
What argument should I pass to cmake find_program to get the python 3 version? -
find_program
searched executable by its filename, so you need to pass python36
for find it.
But preferred way to find python executable is find_package(PythonInterp). That way you may specify minimum version and do not care about exact filename:
find_package(PythonInterp 3)
Upvotes: 2