cmake add check

This commit is contained in:
Daniel Agar 2017-02-24 11:14:25 -05:00
parent f00edc9442
commit fb87165051
2 changed files with 6 additions and 3 deletions

View File

@ -4,9 +4,7 @@ install:
- pip install --user cpp-coveralls
script:
- cmake -DCMAKE_BUILD_TYPE=Profile -DTESTING=ON -DFORMAT=ON .
- make
- make check_format
- ctest -V
- make check
after_success:
- cpp-coveralls -i matrix
env:

View File

@ -96,6 +96,11 @@ if(FORMAT)
)
endif()
if(TESTING AND FORMAT)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
add_dependencies(check test_build check_format)
endif()
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})