mirror of
https://github.com/PerMalmberg/libcron.git
synced 2024-12-15 09:59:51 +08:00
f3fddf5f19
Co-authored-by: Heinz-Peter Liechtenecker <h.liechtenecker@fh-kaernten.at> Co-authored-by: Per Malmberg <PerMalmberg@users.noreply.github.com>
38 lines
1.1 KiB
CMake
38 lines
1.1 KiB
CMake
cmake_minimum_required(VERSION 3.6)
|
|
project(cron_test)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
# Deactivate Iterator-Debugging on Windows
|
|
option(LIBCRON_DEACTIVATE_ITERATOR_DEBUGGING "Build with iterator-debugging (MSVC only)." OFF)
|
|
|
|
if( MSVC )
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
|
|
|
if (LIBCRON_DEACTIVATE_ITERATOR_DEBUGGING)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_HAS_ITERATOR_DEBUGGING=0")
|
|
endif()
|
|
else()
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
|
|
endif()
|
|
|
|
include_directories(
|
|
${CMAKE_CURRENT_LIST_DIR}/externals/Catch2/single_include/
|
|
${CMAKE_CURRENT_LIST_DIR}/../libcron/externals/date/include
|
|
${CMAKE_CURRENT_LIST_DIR}/..
|
|
)
|
|
|
|
add_executable(
|
|
${PROJECT_NAME}
|
|
CronDataTest.cpp
|
|
CronRandomizationTest.cpp
|
|
CronScheduleTest.cpp
|
|
CronTest.cpp)
|
|
|
|
target_link_libraries(${PROJECT_NAME} libcron)
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/out"
|
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/out"
|
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/out")
|