Skip to content

Commit 6fc2170

Browse files
TheLartiansLars Melchior
andauthored
Update example dependency versions (#430)
* update example versions * update doctest * update lua * update google benchmark * update catch2 * update readme to match updated dependencies Co-authored-by: Lars Melchior <lars@Larss-Laptop.local>
1 parent 1184a6e commit 6fc2170

File tree

8 files changed

+15
-30
lines changed

8 files changed

+15
-30
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ include(cmake/CPM.cmake)
3737
3838
CPMAddPackage("gh:fmtlib/fmt#7.1.3")
3939
CPMAddPackage("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

4646
See 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
354354
CPMAddPackage(
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

examples/benchmark/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ CPMAddPackage("gh:cpm-cmake/testpack-fibonacci@2.0")
1111
CPMAddPackage(
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

examples/boost/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ include(../../cmake/CPM.cmake)
1313

1414
CPMAddPackage(
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

2121
target_link_libraries(CPMExampleBoost PRIVATE Boost::asio)

examples/catch2/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ project(CPMExampleCatch2)
77
include(../../cmake/CPM.cmake)
88

99
CPMAddPackage("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

1414
add_executable(CPMExampleCatch2 main.cpp)
15-
target_link_libraries(CPMExampleCatch2 fibonacci Catch2)
15+
target_link_libraries(CPMExampleCatch2 fibonacci Catch2::Catch2WithMain)
1616
target_compile_features(CPMExampleCatch2 PRIVATE cxx_std_17)
1717

1818
# ---- Enable testing ----

examples/catch2/main.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
#define CATCH_CONFIG_MAIN
2-
31
#include <fibonacci.h>
42

5-
#include <catch2/catch.hpp>
3+
#include <catch2/catch_test_macros.hpp>
64

75
TEST_CASE("fibonacci") {
86
REQUIRE(fibonacci(0) == 0);

examples/doctest/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ project(CPMExampleDoctest)
77
include(../../cmake/CPM.cmake)
88

99
CPMAddPackage("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

examples/gtest/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ CPMAddPackage("gh:cpm-cmake/testpack-fibonacci@2.0")
1111
CPMAddPackage(
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

examples/sol2/CMakeLists.txt

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,16 @@ CPMAddPackage(
1515

1616
if(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}>)
2422
endif()
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

4128
add_executable(CPMSol2Example main.cpp)
4229
target_compile_features(CPMSol2Example PRIVATE cxx_std_17)
43-
target_link_libraries(CPMSol2Example sol2)
30+
target_link_libraries(CPMSol2Example sol2 lua)

0 commit comments

Comments
 (0)