Use ctest in cmake.

This commit is contained in:
King_DuckZ 2016-11-02 01:14:47 +01:00
parent f51c739a48
commit dc1b3e7b76
3 changed files with 10 additions and 1 deletions

View file

@ -2,7 +2,7 @@ language: cpp
compiler: gcc
script:
- cmake -DCMAKE_BUILD_TYPE=Debug test/ && make
- ./unit/unit --gtest_filter='*.*'
- ctest
addons:
apt:

View file

@ -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)

View file

@ -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}
)