PatWie/tensorflow-cmake

CMake: Find Tensorflow not working

dvicini opened this issue · 2 comments

Hi,

it seems that a recent commit broke the FindTensorflow.cmake script. In Line 56 in FindTensorflow.cmake, the Python executable is declared as an option. However, from my understanding, options are boolean variables. When I insert a print statement, i.e. message(FATAL_ERROR "${PYTHON_EXECUTABLE}"), I just get OFF as an output, instead of python3. I am not a CMake expert, but wouldn't it be more appropriate to just set a variable, instead of using option?

Delio

It does work

- cmake . -DPYTHON_EXECUTABLE=python2

But I agree, there should be a different way. Maybe

SET(FAB "po" CACHE STRING "Some user-specified option")

Fixed
27c267d