aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/cmake/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/contrib/cmake/CMakeLists.txt')
-rw-r--r--tensorflow/contrib/cmake/CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/tensorflow/contrib/cmake/CMakeLists.txt b/tensorflow/contrib/cmake/CMakeLists.txt
index 9c38e151ff..a935e31f17 100644
--- a/tensorflow/contrib/cmake/CMakeLists.txt
+++ b/tensorflow/contrib/cmake/CMakeLists.txt
@@ -22,7 +22,8 @@ option(tensorflow_BUILD_CC_EXAMPLE "Build the C++ tutorial example" ON)
option(tensorflow_BUILD_PYTHON_BINDINGS "Build the Python bindings" ON)
option(tensorflow_BUILD_ALL_KERNELS "Build all OpKernels" ON)
option(tensorflow_BUILD_CONTRIB_KERNELS "Build OpKernels from tensorflow/contrib/..." ON)
-
+option(tensorflow_BUILD_CC_TESTS "Build cc unit tests " OFF)
+option(tensorflow_BUILD_PYTHON_TESTS "Build python unit tests " OFF)
#Threads: defines CMAKE_THREAD_LIBS_INIT and adds -pthread compile option for
# targets that link ${CMAKE_THREAD_LIBS_INIT}.
@@ -74,6 +75,9 @@ include(jsoncpp)
include(farmhash)
include(highwayhash)
include(protobuf)
+if (tensorflow_BUILD_CC_TESTS)
+ include(googletest)
+endif()
set(tensorflow_EXTERNAL_LIBRARIES
${zlib_STATIC_LIBRARIES}
@@ -194,7 +198,6 @@ include(tf_core_kernels.cmake)
if(tensorflow_ENABLE_GRPC_SUPPORT)
include(tf_core_distributed_runtime.cmake)
endif()
-
include(tf_cc_ops.cmake)
if(tensorflow_BUILD_CC_EXAMPLE)
include(tf_tutorials.cmake)
@@ -203,3 +206,6 @@ endif()
if(tensorflow_BUILD_PYTHON_BINDINGS)
include(tf_python.cmake)
endif()
+if (tensorflow_BUILD_CC_TESTS OR tensorflow_BUILD_PYTHON_TESTS)
+ include(tf_tests.cmake)
+endif()