blob: 7e7cfa4129e98caf5fae77c9866f84c115ab6c11 [file] [log] [blame]
onqtamcc9e8652016-08-02 14:23:38 +03001cmake_minimum_required(VERSION 2.8)
2
3get_filename_component(PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
4project(${PROJECT_NAME})
5
6include(../../scripts/common.cmake)
7
8include_directories("../../doctest/")
9
10add_executable(${PROJECT_NAME} main.cpp test.cpp)
11
12# queries
onqtam4321fd82016-08-02 14:59:17 +030013add_test(NAME help COMMAND $<TARGET_FILE:${PROJECT_NAME}> -dt-h)
onqtamcc9e8652016-08-02 14:23:38 +030014add_test(NAME version COMMAND $<TARGET_FILE:${PROJECT_NAME}> -v)
15add_test(NAME count COMMAND $<TARGET_FILE:${PROJECT_NAME}> -c)
16add_test(NAME list_test_cases COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ltc)
17add_test(NAME list_test_suites COMMAND $<TARGET_FILE:${PROJECT_NAME}> -lts)
18
onqtam4321fd82016-08-02 14:59:17 +030019# options
20add_test(NAME successful COMMAND $<TARGET_FILE:${PROJECT_NAME}> -success=true -exit=Off)
onqtamcc9e8652016-08-02 14:23:38 +030021add_test(NAME abort_after COMMAND $<TARGET_FILE:${PROJECT_NAME}> -aa=3)
22add_test(NAME first_last COMMAND $<TARGET_FILE:${PROJECT_NAME}> -f=2 -l=5)
onqtam4321fd82016-08-02 14:59:17 +030023add_test(NAME filter_1 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -tc=assert*)
onqtam30c5e4b2016-08-02 16:10:22 +030024add_test(NAME filter_2 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -tce=???ert*)
25add_test(NAME filter_3 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -sf=*test*)
26add_test(NAME filter_4 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -sfe=*test*)
onqtam4321fd82016-08-02 14:59:17 +030027add_test(NAME filter_5 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ts=ts1)
28add_test(NAME filter_6 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -tse=ts1)
onqtam30c5e4b2016-08-02 16:10:22 +030029add_test(NAME order_1 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ob=suite)
30add_test(NAME order_2 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ob=name)
31add_test(NAME order_3 COMMAND $<TARGET_FILE:${PROJECT_NAME}> -ob=rand -rs=324)
onqtamcc9e8652016-08-02 14:23:38 +030032
33
34
35