Skip to content

Commit cbcc720

Browse files
authored
Adding dependency to new enum_ops library. (#572)
* Factored out enum_ops. * Fixed potential issues with default_executor with libdispatch. * clang-tidy fixes * added a missing include. * Removing install option - use CPM. Installation with public dependencies is far too complex.
1 parent cf0bb2c commit cbcc720

File tree

161 files changed

+594
-1579
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+594
-1579
lines changed

.clang-tidy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ CheckOptions:
1111
value: >
1212
boost/test/.*;
1313
__chrono/.*
14-
HeaderFilterRegex: '^.*/include/stlab/.*$'
14+
- key: modernize-*.MinimumCppVersion
15+
value: "C++17"
16+
HeaderFilterRegex: "^.*/include/stlab/.*$"
1517
# WarningsAsErrors: "*"

.github/workflows/stlab.yml

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,12 @@ jobs:
5656
sudo apt-get install -y ninja-build
5757
shell: bash
5858

59-
# - name: Install dependencies // Windows
60-
# if: ${{ startsWith(matrix.config.os, 'windows') }}
61-
# run: |
62-
# choco install --yes ninja
63-
# vcpkg install boost-test:x64-windows boost-multiprecision:x64-windows
64-
# vcpkg install boost:x64-windows
65-
# dotnet add package boost --version 1.85.0
66-
# choco install --yes boost-msvc-14.3
67-
# shell: cmd
68-
6959
- name: Install dependencies // Linux Emscripten
7060
if: ${{ startsWith(matrix.config.compiler, 'emscripten') }}
7161
shell: bash
7262
run: |
7363
sudo apt-get update
7464
sudo apt-get install -y ninja-build
75-
# git clone --depth 1 --recurse-submodules --shallow-submodules --jobs=8 https://github.com/boostorg/boost.git $HOME/boost
7665
7766
git clone --depth 1 https://github.com/emscripten-core/emsdk.git $HOME/emsdk
7867
pushd $HOME/emsdk
@@ -100,19 +89,6 @@ jobs:
10089
echo "CC=clang-${{matrix.config.version}}" >> $GITHUB_ENV
10190
echo "CXX=clang++-${{matrix.config.version}}" >> $GITHUB_ENV
10291
103-
# - name: Compile Boost // Emscripten
104-
# if: ${{ startsWith(matrix.config.compiler, 'emscripten') }}
105-
# shell: bash -l {0}
106-
# run: |
107-
# mkdir -p ../build-boost
108-
# cmake -S $HOME/boost -B ../build-boost -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=23 \
109-
# -DCMAKE_CXX_FLAGS="-Wno-deprecated-builtins" \
110-
# -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/cmake/Platform/Emscripten-STLab.cmake \
111-
# -DBOOST_INCLUDE_LIBRARIES="multiprecision;test"
112-
113-
# cmake --build ../build-boost
114-
# cmake --install ../build-boost
115-
11692
- name: Configure // Unix !Emscripten
11793
if: ${{ (startsWith(matrix.config.os, 'ubuntu') || startsWith(matrix.config.os, 'macos')) && !startsWith(matrix.config.compiler, 'emscripten') }}
11894
shell: bash
@@ -154,63 +130,3 @@ jobs:
154130
run: |
155131
cd ../build/
156132
ctest --output-on-failure
157-
158-
test-install:
159-
name: Test CMake Installation
160-
needs: builds
161-
runs-on: ubuntu-latest
162-
steps:
163-
- uses: actions/[email protected]
164-
165-
- name: Install dependencies
166-
run: |
167-
sudo apt-get update
168-
sudo apt-get install -y ninja-build
169-
170-
- name: Build and Install
171-
run: |
172-
# Build and install copy-on-write first
173-
git clone --depth 1 --branch v1.0.3 https://github.com/stlab/copy-on-write.git
174-
cd copy-on-write
175-
mkdir build && cd build
176-
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr/local
177-
cmake --build .
178-
sudo cmake --install .
179-
cd ../..
180-
181-
# Build and install stlab
182-
mkdir build && cd build
183-
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr/local
184-
cmake --build .
185-
sudo cmake --install .
186-
187-
- name: Create Test Project
188-
run: |
189-
mkdir test-install && cd test-install
190-
cat > CMakeLists.txt << 'EOL'
191-
cmake_minimum_required(VERSION 3.23)
192-
project(test_stlab_install)
193-
194-
find_package(stlab REQUIRED)
195-
196-
add_executable(test_stlab main.cpp)
197-
target_link_libraries(test_stlab PRIVATE stlab::stlab)
198-
EOL
199-
200-
cat > main.cpp << 'EOL'
201-
#include <stlab/version.hpp>
202-
#include <iostream>
203-
204-
int main() {
205-
std::cout << "STLab version: " << STLAB_VERSION << std::endl;
206-
return 0;
207-
}
208-
EOL
209-
210-
- name: Build Test Project
211-
run: |
212-
cd test-install
213-
mkdir build && cd build
214-
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release
215-
cmake --build .
216-
./test_stlab

CHANGES.md

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

CMakeLists.txt

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ add_library(stlab::stlab ALIAS stlab)
99
########################################################
1010
# Dependencies
1111
# Enable CPM caching to avoid re-downloading dependencies
12-
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cpm-cache CACHE PATH "Directory to cache CPM packages" FORCE)
13-
12+
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cache/cpm CACHE PATH "Directory to cache CPM packages" FORCE)
1413
include(cmake/CPM.cmake)
1514

16-
1715
# Add stlab-copy-on-write as a dependency
18-
CPMAddPackage("gh:stlab/[email protected].3")
16+
CPMAddPackage("gh:stlab/[email protected].4")
1917
target_link_libraries(stlab INTERFACE stlab::copy-on-write)
2018

19+
CPMAddPackage("gh:stlab/[email protected]")
20+
target_link_libraries(stlab INTERFACE stlab::enum-ops)
21+
2122
########################################################
2223
# clangd
2324

@@ -131,8 +132,7 @@ endif()
131132
#
132133
target_include_directories(stlab INTERFACE
133134
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
134-
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
135-
$<INSTALL_INTERFACE:include>)
135+
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>)
136136

137137
#
138138
# Several definitions are specified for the microsoft compiler. These have
@@ -170,41 +170,3 @@ message(STATUS "stlab: Main Executor: ${STLAB_MAIN_EXECUTOR}")
170170
if(BUILD_TESTING)
171171
add_subdirectory(test)
172172
endif()
173-
174-
include(CMakePackageConfigHelpers) # provides `write_basic_package_version_file`
175-
write_basic_package_version_file(
176-
"${stlab_BINARY_DIR}/stlabConfigVersion.cmake"
177-
VERSION ${stlab_VERSION}
178-
COMPATIBILITY SameMajorVersion)
179-
180-
install(
181-
TARGETS stlab
182-
EXPORT stlabTargets
183-
FILE_SET stlab
184-
)
185-
186-
#
187-
# A CMake configuration file is generated describing the stlab exported targets.
188-
# This file is included by (and installed with) the cmake/CMakeConfig.cmake file
189-
# under version control.
190-
#
191-
install(EXPORT stlabTargets
192-
FILE stlabTargets.cmake
193-
NAMESPACE stlab::
194-
DESTINATION share/cmake/stlab)
195-
196-
#
197-
# Install the CMake configuration files to the `share/cmake/stlab` subdirectory
198-
# of `$INSTALL_DIR/${CMAKE_INSTALL_PREFIX}`. This path will be searched by
199-
# default by the `find_package` intrinsic, provided
200-
# `$INSTALL_DIR/${CMAKE_INSTALL_PREFIX}` is an element of the
201-
# `CMAKE_PREFIX_PATH` environment variable.
202-
#
203-
configure_file(
204-
"${stlab_SOURCE_DIR}/cmake/stlabConfig.cmake.in"
205-
"${stlab_BINARY_DIR}/stlabConfig.cmake"
206-
@ONLY)
207-
install(FILES
208-
"${stlab_BINARY_DIR}/stlabConfig.cmake"
209-
"${stlab_BINARY_DIR}/stlabConfigVersion.cmake"
210-
DESTINATION share/cmake/stlab)

cmake/stlabConfig.cmake.in

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ To run a local Jekyll server, see the instructions in the docker-tools [README](
1010

1111
## Running Hyde in Docker
1212

13+
<!--
1314
Configure the build as follows:
1415
1516
```
1617
cmake --preset=hyde-build-docs
17-
```
18+
``` -->
1819

1920
Login to [GitHub Packages registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic)
2021

@@ -41,7 +42,7 @@ cd /mnt/host/libraries/docs
4142
./about.sh
4243
```
4344

44-
\[ this is from the old docs - need to update the docs and script.
45+
<!-- \[ this is from the old docs - need to update the docs and script.
4546
4647
> (or, simply `-u`) to generate the boilerplate for it. Then, fill in any fields marked as `__MISSING__`. Fields marked as `__OPTIONAL__` may be omitted.
47-
> \]
48+
> \] -->

docs/_data/contributors.json

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"type": "User",
4242
"user_view_type": "public",
4343
"site_admin": false,
44-
"contributions": 175
44+
"contributions": 180
4545
},
4646
{
4747
"login": "fosterbrereton",
@@ -373,6 +373,28 @@
373373
"site_admin": false,
374374
"contributions": 1
375375
},
376+
{
377+
"login": "bmedina",
378+
"id": 41739,
379+
"node_id": "MDQ6VXNlcjQxNzM5",
380+
"avatar_url": "https://avatars.githubusercontent.com/u/41739?v=4",
381+
"gravatar_id": "",
382+
"url": "https://api.github.com/users/bmedina",
383+
"html_url": "https://github.com/bmedina",
384+
"followers_url": "https://api.github.com/users/bmedina/followers",
385+
"following_url": "https://api.github.com/users/bmedina/following{/other_user}",
386+
"gists_url": "https://api.github.com/users/bmedina/gists{/gist_id}",
387+
"starred_url": "https://api.github.com/users/bmedina/starred{/owner}{/repo}",
388+
"subscriptions_url": "https://api.github.com/users/bmedina/subscriptions",
389+
"organizations_url": "https://api.github.com/users/bmedina/orgs",
390+
"repos_url": "https://api.github.com/users/bmedina/repos",
391+
"events_url": "https://api.github.com/users/bmedina/events{/privacy}",
392+
"received_events_url": "https://api.github.com/users/bmedina/received_events",
393+
"type": "User",
394+
"user_view_type": "public",
395+
"site_admin": false,
396+
"contributions": 1
397+
},
376398
{
377399
"login": "laserallan",
378400
"id": 1781787,
@@ -527,6 +549,28 @@
527549
"site_admin": false,
528550
"contributions": 1
529551
},
552+
{
553+
"login": "venik",
554+
"id": 54374,
555+
"node_id": "MDQ6VXNlcjU0Mzc0",
556+
"avatar_url": "https://avatars.githubusercontent.com/u/54374?v=4",
557+
"gravatar_id": "",
558+
"url": "https://api.github.com/users/venik",
559+
"html_url": "https://github.com/venik",
560+
"followers_url": "https://api.github.com/users/venik/followers",
561+
"following_url": "https://api.github.com/users/venik/following{/other_user}",
562+
"gists_url": "https://api.github.com/users/venik/gists{/gist_id}",
563+
"starred_url": "https://api.github.com/users/venik/starred{/owner}{/repo}",
564+
"subscriptions_url": "https://api.github.com/users/venik/subscriptions",
565+
"organizations_url": "https://api.github.com/users/venik/orgs",
566+
"repos_url": "https://api.github.com/users/venik/repos",
567+
"events_url": "https://api.github.com/users/venik/events{/privacy}",
568+
"received_events_url": "https://api.github.com/users/venik/received_events",
569+
"type": "User",
570+
"user_view_type": "public",
571+
"site_admin": false,
572+
"contributions": 1
573+
},
530574
{
531575
"login": "fernandopFF",
532576
"id": 132451124,
@@ -614,49 +658,5 @@
614658
"user_view_type": "public",
615659
"site_admin": false,
616660
"contributions": 1
617-
},
618-
{
619-
"login": "superfunc",
620-
"id": 1583002,
621-
"node_id": "MDQ6VXNlcjE1ODMwMDI=",
622-
"avatar_url": "https://avatars.githubusercontent.com/u/1583002?v=4",
623-
"gravatar_id": "",
624-
"url": "https://api.github.com/users/superfunc",
625-
"html_url": "https://github.com/superfunc",
626-
"followers_url": "https://api.github.com/users/superfunc/followers",
627-
"following_url": "https://api.github.com/users/superfunc/following{/other_user}",
628-
"gists_url": "https://api.github.com/users/superfunc/gists{/gist_id}",
629-
"starred_url": "https://api.github.com/users/superfunc/starred{/owner}{/repo}",
630-
"subscriptions_url": "https://api.github.com/users/superfunc/subscriptions",
631-
"organizations_url": "https://api.github.com/users/superfunc/orgs",
632-
"repos_url": "https://api.github.com/users/superfunc/repos",
633-
"events_url": "https://api.github.com/users/superfunc/events{/privacy}",
634-
"received_events_url": "https://api.github.com/users/superfunc/received_events",
635-
"type": "User",
636-
"user_view_type": "public",
637-
"site_admin": false,
638-
"contributions": 1
639-
},
640-
{
641-
"login": "thinlang",
642-
"id": 37256192,
643-
"node_id": "MDQ6VXNlcjM3MjU2MTky",
644-
"avatar_url": "https://avatars.githubusercontent.com/u/37256192?v=4",
645-
"gravatar_id": "",
646-
"url": "https://api.github.com/users/thinlang",
647-
"html_url": "https://github.com/thinlang",
648-
"followers_url": "https://api.github.com/users/thinlang/followers",
649-
"following_url": "https://api.github.com/users/thinlang/following{/other_user}",
650-
"gists_url": "https://api.github.com/users/thinlang/gists{/gist_id}",
651-
"starred_url": "https://api.github.com/users/thinlang/starred{/owner}{/repo}",
652-
"subscriptions_url": "https://api.github.com/users/thinlang/subscriptions",
653-
"organizations_url": "https://api.github.com/users/thinlang/orgs",
654-
"repos_url": "https://api.github.com/users/thinlang/repos",
655-
"events_url": "https://api.github.com/users/thinlang/events{/privacy}",
656-
"received_events_url": "https://api.github.com/users/thinlang/received_events",
657-
"type": "User",
658-
"user_view_type": "public",
659-
"site_admin": false,
660-
"contributions": 1
661661
}
662662
]

0 commit comments

Comments
 (0)