Allows tests to be skipped

This commit is contained in:
ryanmrichard 2017-09-01 13:39:59 -05:00
parent 8ac4d5c83f
commit e1a81f22a7
No known key found for this signature in database
GPG key ID: 35D28DEC90739120

View file

@ -9,7 +9,11 @@ include (FindPkgConfig)
include(CheckCXXSourceCompiles)
# build type
if( NOT DEFINED CMAKE_BUILD_TYPE )
set(CMAKE_BUILD_TYPE Debug)
endif( NOT DEFINED CMAKE_BUILD_TYPE )
option( BUILD_TESTS "If true Sprout's tests will be built" TRUE)
set(CMAKE_CXX_FLAGS_DEBUG "-W -Wall -Wextra -Wno-unused-parameter -Werror -std=c++0x -O0 -g")
@ -22,6 +26,7 @@ if( NOT DEFINED CMAKE_VERBOSE_MAKEFILE )
set(CMAKE_VERBOSE_MAKEFILE OFF)
endif( NOT DEFINED CMAKE_VERBOSE_MAKEFILE )
if( NOT DEFINED Boost_USE_MULTITHREADED )
set(Boost_USE_MULTITHREADED ON)
endif( NOT DEFINED Boost_USE_MULTITHREADED )
@ -35,5 +40,8 @@ pkg_check_modules(OpenCV opencv)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ${Boost_INCLUDE_DIRS} )
link_directories( ${Boost_LIBRARY_DIRS} )
subdirs( sprout libs tools cmake )
subdirs( sprout tools cmake )
if( ${BUILD_TESTS} )
subdirs(libs)
endif( ${BUILD_TESTS} )