Added cmake option to turn on/off tests (off by default)
This commit is contained in:
parent
3148348c37
commit
86a1707b75
3 changed files with 5 additions and 0 deletions
|
@ -30,6 +30,7 @@ script:
|
|||
- >
|
||||
cmake
|
||||
-Wno-dev
|
||||
-DTESTS=ON
|
||||
-DCOVERALLS=${COVERAGE}
|
||||
-DCMAKE_BUILD_TYPE=${CONFIGURATION}
|
||||
-DCMAKE_INSTALL_PREFIX=criterion-${TRAVIS_TAG}
|
||||
|
|
|
@ -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 ()
|
||||
|
|
|
@ -38,6 +38,7 @@ install:
|
|||
- >
|
||||
cmake
|
||||
-Wno-dev
|
||||
-DTESTS=ON
|
||||
-DCMAKE_INSTALL_PREFIX="criterion-%RELEASE_NAME%"
|
||||
-DCMAKE_BUILD_TYPE="%CONFIGURATION%"
|
||||
-G "%GENERATOR%"
|
||||
|
|
Loading…
Add table
Reference in a new issue