1
0
mirror of https://github.com/PerMalmberg/libcron.git synced 2025-10-18 05:45:20 -05:00

Avoid compiler warnings on compilers supporting std::uncaught_exceptions() (#12)

* Avoid compiler warnings on compilers supporting std::uncaught_exceptions()

* Remove test that is depends on the performance of the CPU.
This commit is contained in:
Per Malmberg
2020-12-04 11:43:18 +01:00
committed by GitHub
parent f3fddf5f19
commit 9edb758ca8
3 changed files with 13 additions and 196 deletions

View File

@@ -29,7 +29,14 @@ add_executable(
CronScheduleTest.cpp
CronTest.cpp)
target_link_libraries(${PROJECT_NAME} libcron)
if(NOT MSVC)
target_link_libraries(${PROJECT_NAME} libcron pthread)
# Assume a modern compiler supporting uncaught_exceptions()
target_compile_definitions (${PROJECT_NAME} PRIVATE -DHAS_UNCAUGHT_EXCEPTIONS)
else()
target_link_libraries(${PROJECT_NAME} libcron)
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/out"