Skip to content

Commit

Permalink
cmake switch to turn off test building
Browse files Browse the repository at this point in the history
  • Loading branch information
bloke committed Apr 14, 2018
1 parent 83f311f commit da65617
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ endif()
find_package(OpenCL QUIET)

option(BUILD_TRAINING_TOOLS "Build training tools" ON)
option(BUILD_TESTS "Build tests" ON)

###############################################################################
#
Expand Down Expand Up @@ -300,7 +301,7 @@ target_link_libraries (tesseract libtesseract)

########################################

if (EXISTS ${PROJECT_SOURCE_DIR}/googletest/CMakeLists.txt)
if (BUILD_GTEST AND EXISTS ${PROJECT_SOURCE_DIR}/googletest/CMakeLists.txt)
add_subdirectory(googletest)
add_executable(tesseract_tests tests/tesseracttests.cpp)
target_link_libraries(tesseract_tests gtest_main)
Expand Down

0 comments on commit da65617

Please sign in to comment.