Skip to content

Commit fb838a1

Browse files
authored
Updating CPM and version for 2.0.2 release (#570)
1 parent f388904 commit fb838a1

File tree

3 files changed

+31
-11
lines changed

3 files changed

+31
-11
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v2.0.2 - 2025 - June 27
2+
- See [the release notes](https://github.com/stlab/libraries/releases/tag/v2.0.2) for details.
3+
14
## v2.0.0 - 2025 - June 27
25
- See [the release notes](https://github.com/stlab/libraries/releases/tag/v2.0.0) for details.
36

CMakeLists.txt

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
cmake_minimum_required(VERSION 3.23)
22

3-
project(stlab VERSION 2.0.1 LANGUAGES CXX)
3+
project(stlab VERSION 2.0.2 LANGUAGES CXX)
44

55
# Create the main library target first
66
add_library(stlab)
77
add_library(stlab::stlab ALIAS stlab)
88

99
########################################################
1010
# Dependencies
11-
12-
# download CPM.cmake
13-
file(
14-
DOWNLOAD
15-
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.40.8/CPM.cmake
16-
${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
17-
EXPECTED_HASH SHA256=78ba32abdf798bc616bab7c73aac32a17bbd7b06ad9e26a6add69de8f3ae4791
18-
)
19-
include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)
20-
2111
# Enable CPM caching to avoid re-downloading dependencies
2212
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cpm-cache CACHE PATH "Directory to cache CPM packages" FORCE)
2313

14+
include(cmake/CPM.cmake)
15+
16+
2417
# Add stlab-copy-on-write as a dependency
2518
CPMAddPackage("gh:stlab/[email protected]")
2619
target_link_libraries(stlab INTERFACE stlab::copy-on-write)

cmake/CPM.cmake

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-License-Identifier: MIT
2+
#
3+
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors
4+
5+
set(CPM_DOWNLOAD_VERSION 0.42.0)
6+
set(CPM_HASH_SUM "2020b4fc42dba44817983e06342e682ecfc3d2f484a581f11cc5731fbe4dce8a")
7+
8+
if(CPM_SOURCE_CACHE)
9+
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
10+
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
11+
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
12+
else()
13+
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
14+
endif()
15+
16+
# Expand relative path. This is important if the provided path contains a tilde (~)
17+
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
18+
19+
file(DOWNLOAD
20+
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
21+
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM}
22+
)
23+
24+
include(${CPM_DOWNLOAD_LOCATION})

0 commit comments

Comments
 (0)