aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow
diff options
context:
space:
mode:
authorGravatar Erik Smistad <ersmistad@gmail.com>2017-05-05 22:36:24 +0200
committerGravatar Vijay Vasudevan <vrv@google.com>2017-05-05 13:36:24 -0700
commit65f8c5ca31a8dc217133f559281ced876d580113 (patch)
tree00fa6111a26041deca98f02edb69c3620a4d5418 /tensorflow
parent8acd528f93a25998cfd192b9a732e233d624fdad (diff)
Fix error of version_info.cc not being generated on windows if building python bindings is disabled in CMake (#9660)
Diffstat (limited to 'tensorflow')
-rw-r--r--tensorflow/contrib/cmake/CMakeLists.txt6
-rwxr-xr-xtensorflow/contrib/cmake/tf_python.cmake1
2 files changed, 6 insertions, 1 deletions
diff --git a/tensorflow/contrib/cmake/CMakeLists.txt b/tensorflow/contrib/cmake/CMakeLists.txt
index af7b4fb386..83b405fd4e 100644
--- a/tensorflow/contrib/cmake/CMakeLists.txt
+++ b/tensorflow/contrib/cmake/CMakeLists.txt
@@ -229,6 +229,12 @@ if (tensorflow_ENABLE_GPU)
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!
include(tf_core_framework.cmake)
# NOTE: Disabled until issue #3996 is fixed.
diff --git a/tensorflow/contrib/cmake/tf_python.cmake b/tensorflow/contrib/cmake/tf_python.cmake
index 9e2eb71b4c..bfd6a18c78 100755
--- a/tensorflow/contrib/cmake/tf_python.cmake
+++ b/tensorflow/contrib/cmake/tf_python.cmake
@@ -27,7 +27,6 @@
# 1. Resolve the installed version of Python (for Python.h and python).
# TODO(mrry): Parameterize the build script to enable Python 3 building.
-include(FindPythonInterp)
if(NOT PYTHON_INCLUDE_DIR)
set(PYTHON_NOT_FOUND false)
exec_program("${PYTHON_EXECUTABLE}"