-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added Maxtest to unit test * fixed CMakeLists.txt * added PRIVATE specifier to CMakeLists.txt
- Loading branch information
Showing
5 changed files
with
167 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,40 @@ | ||
# add_executable( | ||
# unit | ||
# unit.cpp | ||
# ${SIGFN_SOURCES}) | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
Maxtest | ||
GIT_REPOSITORY https://github.com/maxtek6/maxtest.git | ||
GIT_TAG master | ||
) | ||
FetchContent_MakeAvailable(Maxtest) | ||
|
||
# target_include_directories(unit PRIVATE ${SIGFN_INCLUDE} ${CMAKE_CURRENT_SOURCE_DIR}/../src) | ||
add_executable( | ||
unit | ||
unit.cpp | ||
${SIGFN_SOURCES}) | ||
|
||
# if(SIGFN_COVER) | ||
# if(WIN32) | ||
# message("skipping code coverage for windows") | ||
# else() | ||
# target_compile_options(unit PRIVATE -fprofile-arcs -ftest-coverage -g -O0) | ||
# target_link_libraries(unit PRIVATE gcov "--coverage") | ||
# add_custom_target( | ||
# cover | ||
# DEPENDS unit) | ||
# add_custom_command( | ||
# TARGET cover | ||
# COMMAND gcovr -r ${CMAKE_CURRENT_SOURCE_DIR}/.. -e ${CMAKE_CURRENT_SOURCE_DIR}) | ||
# endif() | ||
# endif() | ||
target_include_directories(unit PRIVATE ${SIGFN_INCLUDE} ${CMAKE_CURRENT_SOURCE_DIR}/../src) | ||
|
||
# add_test(NAME sigfn_handle COMMAND unit sigfn_handle ) | ||
# add_test(NAME sigfn_ignore COMMAND unit sigfn_ignore) | ||
# add_test(NAME sigfn_reset COMMAND unit sigfn_reset) | ||
# add_test(NAME sigfn_error COMMAND unit sigfn_error) | ||
# add_test(NAME sigfn::handle COMMAND unit sigfn::handle) | ||
# add_test(NAME sigfn::ignore COMMAND unit sigfn::ignore) | ||
# add_test(NAME sigfn::reset COMMAND unit sigfn::reset) | ||
if(SIGFN_COVER) | ||
if(WIN32) | ||
message("skipping code coverage for windows") | ||
target_link_libraries(unit PRIVATE Maxtest::Maxtest) | ||
else() | ||
target_compile_options(unit PRIVATE -fprofile-arcs -ftest-coverage -g -O0) | ||
target_link_libraries(unit PRIVATE Maxtest::Maxtest gcov "--coverage") | ||
add_custom_target( | ||
cover | ||
DEPENDS unit) | ||
add_custom_command( | ||
TARGET cover | ||
COMMAND gcovr -r ${CMAKE_CURRENT_SOURCE_DIR}/.. -e ${CMAKE_CURRENT_SOURCE_DIR}) | ||
endif() | ||
else() | ||
target_link_libraries(unit PRIVATE Maxtest::Maxtest) | ||
endif() | ||
|
||
add_library(threadpool_a STATIC threadpool.cpp) | ||
target_include_directories(threadpool_a PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
add_library(threadpool SHARED threadpool.cpp) | ||
target_include_directories(threadpool PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
add_library(threadpool INTERFACE) | ||
|
||
target_include_directories(threadpool INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) | ||
maxtest_add_test(unit sigfn_handle "") | ||
maxtest_add_test(unit sigfn_ignore "") | ||
maxtest_add_test(unit sigfn_reset "") | ||
maxtest_add_test(unit sigfn_error "") | ||
maxtest_add_test(unit sigfn::handle "") | ||
maxtest_add_test(unit sigfn::ignore "") | ||
maxtest_add_test(unit sigfn::reset "") |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.