Skip to content

Commit da65617

Browse files
author
bloke
committed
cmake switch to turn off test building
1 parent 83f311f commit da65617

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ endif()
110110
find_package(OpenCL QUIET)
111111

112112
option(BUILD_TRAINING_TOOLS "Build training tools" ON)
113+
option(BUILD_TESTS "Build tests" ON)
113114

114115
###############################################################################
115116
#
@@ -300,7 +301,7 @@ target_link_libraries (tesseract libtesseract)
300301

301302
########################################
302303

303-
if (EXISTS ${PROJECT_SOURCE_DIR}/googletest/CMakeLists.txt)
304+
if (BUILD_GTEST AND EXISTS ${PROJECT_SOURCE_DIR}/googletest/CMakeLists.txt)
304305
add_subdirectory(googletest)
305306
add_executable(tesseract_tests tests/tesseracttests.cpp)
306307
target_link_libraries(tesseract_tests gtest_main)

0 commit comments

Comments
 (0)