[CMakeLists.txt] Added option to disable building tests.
parent
bf793e9bfb
commit
5db8341153
|
@ -23,12 +23,14 @@ addons:
|
|||
- libxi-dev
|
||||
- g++-8
|
||||
- cmake
|
||||
- cxxtest
|
||||
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake ..
|
||||
- make -j8
|
||||
# - ./openminer_tests
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
|
|
@ -15,6 +15,8 @@ endif ()
|
|||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
option(OM_BUILD_TESTS ON "Enable building tests if CxxTest is available")
|
||||
|
||||
include_directories(external)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -131,6 +133,7 @@ add_subdirectory(source/client)
|
|||
#------------------------------------------------------------------------------
|
||||
# Unit testing
|
||||
#------------------------------------------------------------------------------
|
||||
if(OM_BUILD_TESTS)
|
||||
find_package(CxxTest QUIET)
|
||||
|
||||
if(CXXTEST_FOUND)
|
||||
|
@ -149,4 +152,5 @@ if(CXXTEST_FOUND)
|
|||
else()
|
||||
message(WARNING "CxxTest not found!")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue