File tree Expand file tree Collapse file tree 8 files changed +15
-30
lines changed Expand file tree Collapse file tree 8 files changed +15
-30
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ include(cmake/CPM.cmake)
3737
3838CPMAddPackage("gh:fmtlib/fmt#7.1.3")
3939CPMAddPackage("gh:nlohmann/json@3.10.5")
40- CPMAddPackage("gh:catchorg/Catch2@2.5.0 ")
40+ CPMAddPackage("gh:catchorg/Catch2@3.2.1 ")
4141
4242# link dependencies
43- target_link_libraries(main fmt::fmt nlohmann_json::nlohmann_json Catch2::Catch2 )
43+ target_link_libraries(main fmt::fmt nlohmann_json::nlohmann_json Catch2::Catch2WithMain )
4444```
4545
4646See the [ examples directory] ( https://github.com/cpm-cmake/CPM.cmake/tree/master/examples ) for complete examples with source code and check [ below] ( #snippets ) or in the [ wiki] ( https://github.com/cpm-cmake/CPM.cmake/wiki/More-Snippets ) for example snippets.
@@ -353,9 +353,9 @@ CPMAddPackage(
353353# using `CPM_SOURCE_CACHE` is strongly recommended
354354CPMAddPackage(
355355 NAME Boost
356- VERSION 1.77 .0
356+ VERSION 1.81 .0
357357 GITHUB_REPOSITORY "boostorg/boost"
358- GIT_TAG "boost-1.77 .0"
358+ GIT_TAG "boost-1.81 .0"
359359)
360360```
361361
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ CPMAddPackage("gh:cpm-cmake/testpack-fibonacci@2.0")
1111CPMAddPackage(
1212 NAME benchmark
1313 GITHUB_REPOSITORY google/benchmark
14- VERSION 1.5.2
14+ VERSION 1.7.1
1515 OPTIONS "BENCHMARK_ENABLE_TESTING Off"
1616)
1717
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ include(../../cmake/CPM.cmake)
1313
1414CPMAddPackage(
1515 NAME Boost
16- VERSION 1.77 .0
16+ VERSION 1.81 .0
1717 GITHUB_REPOSITORY "boostorg/boost"
18- GIT_TAG "boost-1.77 .0"
18+ GIT_TAG "boost-1.81 .0"
1919)
2020
2121target_link_libraries (CPMExampleBoost PRIVATE Boost::asio)
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ project(CPMExampleCatch2)
77include (../../cmake/CPM.cmake)
88
99CPMAddPackage("gh:cpm-cmake/testpack-fibonacci@2.0" )
10- CPMAddPackage("gh:catchorg/Catch2@2.13.4 " )
10+ CPMAddPackage("gh:catchorg/Catch2@3.2.1 " )
1111
1212# ---- Create binary ----
1313
1414add_executable (CPMExampleCatch2 main.cpp)
15- target_link_libraries (CPMExampleCatch2 fibonacci Catch2)
15+ target_link_libraries (CPMExampleCatch2 fibonacci Catch2::Catch2WithMain )
1616target_compile_features (CPMExampleCatch2 PRIVATE cxx_std_17)
1717
1818# ---- Enable testing ----
Original file line number Diff line number Diff line change 1- #define CATCH_CONFIG_MAIN
2-
31#include < fibonacci.h>
42
5- #include < catch2/catch .hpp>
3+ #include < catch2/catch_test_macros .hpp>
64
75TEST_CASE (" fibonacci" ) {
86 REQUIRE (fibonacci (0 ) == 0 );
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ project(CPMExampleDoctest)
77include (../../cmake/CPM.cmake)
88
99CPMAddPackage("gh:cpm-cmake/testpack-fibonacci@2.0" )
10- CPMAddPackage("gh:onqtam/doctest# 2.4.5 " )
10+ CPMAddPackage("gh:onqtam/doctest@ 2.4.9 " )
1111
1212# ---- Create binary ----
1313
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ CPMAddPackage("gh:cpm-cmake/testpack-fibonacci@2.0")
1111CPMAddPackage(
1212 NAME googletest
1313 GITHUB_REPOSITORY google/googletest
14- GIT_TAG release-1.10.0
15- VERSION 1.10.0
14+ GIT_TAG release-1.12.1
15+ VERSION 1.12.1
1616 OPTIONS "INSTALL_GTEST OFF" "gtest_force_shared_crt"
1717)
1818
Original file line number Diff line number Diff line change @@ -15,29 +15,16 @@ CPMAddPackage(
1515
1616if (lua_ADDED)
1717 # lua has no CMakeLists, so we create our own target
18-
1918 file (GLOB lua_sources ${lua_SOURCE_DIR} /*.c)
2019 list (REMOVE_ITEM lua_sources "${lua_SOURCE_DIR} /lua.c" "${lua_SOURCE_DIR} /luac.c" )
2120 add_library (lua STATIC ${lua_sources} )
22-
2321 target_include_directories (lua SYSTEM PUBLIC $<BUILD_INTERFACE:${lua_SOURCE_DIR} >)
2422endif ()
2523
26- CPMAddPackage(
27- NAME sol2
28- URL https://github.com/ThePhD/sol2/archive/v3.0.2.zip
29- VERSION 3.0.2
30- DOWNLOAD_ONLY YES
31- )
32-
33- if (sol2_ADDED)
34- add_library (sol2 INTERFACE IMPORTED )
35- target_include_directories (sol2 SYSTEM INTERFACE ${sol2_SOURCE_DIR} /include )
36- target_link_libraries (sol2 INTERFACE lua)
37- endif ()
24+ CPMAddPackage("gh:ThePhD/sol2@3.3.0" )
3825
3926# ---- Executable ----
4027
4128add_executable (CPMSol2Example main.cpp)
4229target_compile_features (CPMSol2Example PRIVATE cxx_std_17)
43- target_link_libraries (CPMSol2Example sol2)
30+ target_link_libraries (CPMSol2Example sol2 lua )
You can’t perform that action at this time.
0 commit comments