Reputation: 1095
I can use cmake like this:
cmake -DPYTHON_EXECUTABLE=~/build/python ..
How could I write this in my CMakeLists.txt
so that I could simply run this:
cmake ..
Upvotes: 1
Views: 1517
Reputation: 1585
Include
set(PYTHON_EXECUTABLE $ENV{HOME}/build/python CACHE FILEPATH "")
in your CMakeLists.txt. For more information about the set
command see the online documentation or run cmake --help set
.
EDIT: The CACHE FILEPATH ""
part here is mandatory, as pointed out below.
Upvotes: 1