Use ctest in cmake.
This commit is contained in:
parent
f51c739a48
commit
dc1b3e7b76
3 changed files with 10 additions and 1 deletions
|
@ -2,7 +2,7 @@ language: cpp
|
|||
compiler: gcc
|
||||
script:
|
||||
- cmake -DCMAKE_BUILD_TYPE=Debug test/ && make
|
||||
- ./unit/unit --gtest_filter='*.*'
|
||||
- ctest
|
||||
|
||||
addons:
|
||||
apt:
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)
|
||||
|
||||
include(CTest)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 -std=c++11")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -std=c++11")
|
||||
|
||||
|
@ -12,3 +14,4 @@ include_directories(SYSTEM
|
|||
)
|
||||
include_directories(../include)
|
||||
add_subdirectory(unit)
|
||||
add_subdirectory(unit_noconv)
|
||||
|
|
|
@ -15,3 +15,9 @@ target_link_libraries(${PROJECT_NAME}
|
|||
target_compile_definitions(${PROJECT_NAME}
|
||||
PRIVATE VWR_WITH_IMPLICIT_CONVERSIONS
|
||||
)
|
||||
|
||||
add_test(
|
||||
NAME TestNormal
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMAND ${PROJECT_NAME}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue