Added cmake option to turn on/off tests (off by default)

This commit is contained in:
Snaipe 2015-09-21 23:26:47 +02:00
parent 3148348c37
commit 86a1707b75
3 changed files with 5 additions and 0 deletions

View file

@ -30,6 +30,7 @@ script:
- >
cmake
-Wno-dev
-DTESTS=ON
-DCOVERALLS=${COVERAGE}
-DCMAKE_BUILD_TYPE=${CONFIGURATION}
-DCMAKE_INSTALL_PREFIX=criterion-${TRAVIS_TAG}

View file

@ -50,6 +50,7 @@ endif()
# Setup coveralls
option(TESTS "Turn on the samples and test" OFF)
option(COVERALLS "Turn on coveralls support" OFF)
option(COVERALLS_UPLOAD "Upload the generated coveralls json" ON)
@ -192,6 +193,8 @@ add_custom_target(gcov
-P "${CMAKE_MODULE_PATH}/Gcov.cmake"
)
if (TESTS)
enable_testing()
add_subdirectory(samples)
add_subdirectory(test)
endif ()

View file

@ -38,6 +38,7 @@ install:
- >
cmake
-Wno-dev
-DTESTS=ON
-DCMAKE_INSTALL_PREFIX="criterion-%RELEASE_NAME%"
-DCMAKE_BUILD_TYPE="%CONFIGURATION%"
-G "%GENERATOR%"