I am currently working on a project where the source files are all written in python. The files/modules are currently being run on a python interpreter(CPython). I want to use PyPy interpreter instead as i see it is much more efficient. Is there way how I can change the interpreter from the CMakeLists.txt file so the build process takes in PyPy interpreter instead of the python default interpreter? I have a project named P and it contains a CMakeLists.txt file.
Asked
Active
Viewed 267 times
1 Answers
1
When it needs python interpreter, CMakeLists.txt
usually uses find_package(PythonInterp), which searches python executable and sets PYTHON_EXECUTABLE
to the path where it is located.
You may set this cache variable when call cmake
:
cmake -DPYTHON_EXECUTABLE=<path-to-PyPy> ...
so it will not search executable but use one you provide.

Tsyvarev
- 60,011
- 17
- 110
- 153