Fix error of version_info.cc not being generated on windows if building python bindings is disabled in CMake (#9660)

This commit is contained in:
Erik Smistad 2017-05-05 22:36:24 +02:00 committed by Vijay Vasudevan
parent 8acd528f93
commit 65f8c5ca31
2 changed files with 6 additions and 1 deletions

View File

@ -229,6 +229,12 @@ if (tensorflow_ENABLE_GPU)
endif() endif()
endif() endif()
# Find python executable
include(FindPythonInterp)
if(NOT ${PYTHONINTERP_FOUND})
message(FATAL_ERROR "CMake was unable to find a python interpreter.")
endif()
# Let's get to work! # Let's get to work!
include(tf_core_framework.cmake) include(tf_core_framework.cmake)
# NOTE: Disabled until issue #3996 is fixed. # NOTE: Disabled until issue #3996 is fixed.

View File

@ -27,7 +27,6 @@
# 1. Resolve the installed version of Python (for Python.h and python). # 1. Resolve the installed version of Python (for Python.h and python).
# TODO(mrry): Parameterize the build script to enable Python 3 building. # TODO(mrry): Parameterize the build script to enable Python 3 building.
include(FindPythonInterp)
if(NOT PYTHON_INCLUDE_DIR) if(NOT PYTHON_INCLUDE_DIR)
set(PYTHON_NOT_FOUND false) set(PYTHON_NOT_FOUND false)
exec_program("${PYTHON_EXECUTABLE}" exec_program("${PYTHON_EXECUTABLE}"