diff --git a/CMakeLists.txt b/CMakeLists.txt index 03513d4..43369e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.30) +cmake_minimum_required(VERSION 3.28) project(UDBM VERSION 2.0.15 LANGUAGES CXX C) include(CMakePackageConfigHelpers) include(GNUInstallDirs) diff --git a/cmake/boost.cmake b/cmake/boost.cmake index ce7d4df..f6dc1b4 100644 --- a/cmake/boost.cmake +++ b/cmake/boost.cmake @@ -9,6 +9,9 @@ set(Boost_USE_STATIC_RUNTIME ON) # Mac insists on ON for boost_program_options #set(Boost_DEBUG ON) set(Boost_VERSION 1.86.0) +if (POLICY CMP0167) + cmake_policy (SET CMP0167 NEW) +endif () if (BOOST_INCLUDE_LIBRARIES) find_package(Boost ${Boost_VERSION} COMPONENTS ${BOOST_INCLUDE_LIBRARIES} QUIET) else(BOOST_INCLUDE_LIBRARIES) diff --git a/cmake/doctest.cmake b/cmake/doctest.cmake index acbd69a..39196ed 100644 --- a/cmake/doctest.cmake +++ b/cmake/doctest.cmake @@ -1,4 +1,4 @@ -find_package(doctest 2.4.11 QUIET) +find_package(doctest 2.5.2 QUIET) if (doctest_FOUND) if (TARGET doctest::doctest_with_main) @@ -25,7 +25,7 @@ else(doctest_FOUND) FetchContent_Declare( doctest GIT_REPOSITORY https://github.com/doctest/doctest - GIT_TAG v2.4.11 + GIT_TAG v2.5.2 GIT_SHALLOW TRUE # get only the last commit version GIT_PROGRESS TRUE # show progress of download # FIND_PACKAGE_ARGS NAMES doctest diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7dc05ec..4f7db19 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -14,6 +14,7 @@ foreach(source ${test_cpp_sources}) get_filename_component(test_target ${source} NAME_WE) add_executable(${test_target} ${source}) target_link_libraries(${test_target} ${libs} doctest_with_main) + target_compile_definitions(${test_target} PUBLIC DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN) endforeach() # comments contain expected time of Linux debug build, YMMV, whereas timeouts