mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-10-31 15:20:13 +00:00
cmake: run notcurses-tester first among tests
This commit is contained in:
parent
2922b8c663
commit
cc5f9f0cb7
@ -550,6 +550,28 @@ endif()
|
||||
# Testing
|
||||
if(${BUILD_TESTING})
|
||||
#set(CMAKE_CTEST_ARGUMENTS "-V")
|
||||
if(${USE_DOCTEST})
|
||||
file(GLOB TESTSRCS CONFIGURE_DEPENDS tests/*.cpp)
|
||||
add_executable(notcurses-tester ${TESTSRCS})
|
||||
target_include_directories(notcurses-tester
|
||||
PRIVATE
|
||||
include
|
||||
"${PROJECT_BINARY_DIR}/include"
|
||||
src/lib
|
||||
)
|
||||
target_link_libraries(notcurses-tester
|
||||
PRIVATE
|
||||
unistring
|
||||
notcurses++
|
||||
"${TERMINFO_LIBRARIES}"
|
||||
)
|
||||
add_test(
|
||||
NAME notcurses-tester
|
||||
COMMAND notcurses-tester -p ${CMAKE_CURRENT_SOURCE_DIR}/data
|
||||
)
|
||||
set_tests_properties(notcurses-tester PROPERTIES RUN_SERIAL TRUE)
|
||||
install(TARGETS notcurses-tester DESTINATION bin)
|
||||
endif()
|
||||
enable_testing()
|
||||
# the accursed Ubuntu buildd sets "TERM=unknown" for unfathomable reasons
|
||||
if(DEFINED ENV{TERM} AND NOT $ENV{TERM} STREQUAL "unknown" AND USE_POC)
|
||||
@ -581,28 +603,6 @@ set_tests_properties(ncpp_build ncpp_build_exceptions rgb rgbbg
|
||||
PROPERTIES RUN_SERIAL TRUE
|
||||
)
|
||||
endif()
|
||||
if(${USE_DOCTEST})
|
||||
file(GLOB TESTSRCS CONFIGURE_DEPENDS tests/*.cpp)
|
||||
add_executable(notcurses-tester ${TESTSRCS})
|
||||
target_include_directories(notcurses-tester
|
||||
PRIVATE
|
||||
include
|
||||
"${PROJECT_BINARY_DIR}/include"
|
||||
src/lib
|
||||
)
|
||||
target_link_libraries(notcurses-tester
|
||||
PRIVATE
|
||||
unistring
|
||||
notcurses++
|
||||
"${TERMINFO_LIBRARIES}"
|
||||
)
|
||||
add_test(
|
||||
NAME notcurses-tester
|
||||
COMMAND notcurses-tester -p ${CMAKE_CURRENT_SOURCE_DIR}/data
|
||||
)
|
||||
set_tests_properties(notcurses-tester PROPERTIES RUN_SERIAL TRUE)
|
||||
install(TARGETS notcurses-tester DESTINATION bin)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_custom_target(demo
|
||||
|
Loading…
Reference in New Issue
Block a user