reworkes test infrastructure and tests

This commit is contained in:
2022-10-02 11:39:06 +02:00
parent 6516244afe
commit aa58ec0fa7
9 changed files with 121 additions and 154 deletions

View File

@@ -1,13 +1,9 @@
cmake_minimum_required(VERSION 3.12)
find_package(Boost COMPONENTS program_options REQUIRED)
add_executable (ordered_sem
sc_main.cpp
)
target_link_libraries (ordered_sem LINK_PUBLIC scc)
if(TARGET Boost::program_options)
target_link_libraries(ordered_sem PUBLIC Boost::program_options)
else()
target_link_libraries(ordered_sem LINK_PUBLIC ${BOOST_program_options_LIBRARY})
endif()
project (ordered_semaphore)
add_test(NAME ordered_sem_test COMMAND ordered_sem)
add_executable(${PROJECT_NAME}
test.cpp
${test_util_SOURCE_DIR}/sc_main.cpp
)
target_link_libraries (${PROJECT_NAME} PUBLIC test_util)
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})