Skip to content

Commit 4c7a6c6

Browse files
committed
Fix
1 parent 58c4393 commit 4c7a6c6

File tree

6 files changed

+11
-186
lines changed

6 files changed

+11
-186
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ endif()
5656
find_package(Boost REQUIRED)
5757
if(Boost_FOUND)
5858
message(STATUS "Found Boost ${Boost_VERSION}.")
59-
else()
60-
message(STATUS "Could not find libraries for Boost.")
6159
endif()
6260

6361
if(YSTDLIB_CPP_ENABLE_TESTS)

src/.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ IncludeCategories:
66
# NOTE: clang-format retains leading white-space on a line in violation of the YAML spec.
77
- Regex: "<(ystdlib)"
88
Priority: 3
9-
- Regex: "<(catch2|outcome)"
9+
- Regex: "<(catch2|boost)"
1010
Priority: 4
1111
# C system headers
1212
- Regex: "^<.+\\.h>"

src/ystdlib/error_handling/Result.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#ifndef YSTDLIB_ERROR_HANDLING_RESULT_HPP
22
#define YSTDLIB_ERROR_HANDLING_RESULT_HPP
33

4+
#include <system_error>
5+
46
#include <boost/outcome/config.hpp>
57
#include <boost/outcome/std_result.hpp>
68
#include <boost/outcome/success_failure.hpp>
79
#include <boost/outcome/try.hpp>
8-
#include <system_error>
910

1011
namespace ystdlib::error_handling {
1112
/**

src/ystdlib/wrapped_facade_headers/test/test_sys_types.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include <catch2/catch_test_macros.hpp>
44

5-
namespace ystdlib::wrapped_facade_headers::test { namespace {
5+
namespace ystdlib::wrapped_facade_headers::test {
66
TEST_CASE("test_sys_types_u_char", "[wrapped_facade_headers][sys_types][u_char]") {
77
u_char const i{0};
88
REQUIRE(0 == i);
@@ -163,4 +163,4 @@ TEST_CASE("test_sys_types_fsfilcnt_t", "[wrapped_facade_headers][sys_types][fsfi
163163
fsfilcnt_t const i{0};
164164
REQUIRE(0 == i);
165165
}
166-
}} // namespace ystdlib::wrapped_facade_headers::test
166+
} // namespace ystdlib::wrapped_facade_headers::test

taskfiles/deps.yaml

Lines changed: 4 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -39,175 +39,10 @@ tasks:
3939
internal: true
4040
run: "once"
4141
cmds:
42-
- task: "boost-download-and-install"
42+
- task: ":utils:boost:download-and-install"
4343
vars:
44-
WORK_DIR: "{{.G_DEPS_DIR}}/boost"
45-
FILE_SHA256: "2128a4c96862b5c0970c1e34d76b1d57e4a1016b80df85ad39667f30b1deba26"
44+
CMAKE_SETTINGS_DIR: "{{.G_DEPS_CMAKE_SETTINGS_DIR}}"
45+
FILE_SHA256: "d6c69e4459eb5d6ec208250291221e7ff4a2affde9af6e49c9303b89c687461f"
4646
URL: "https://github.com/boostorg/boost/releases/download/boost-1.87.0/\
4747
boost-1.87.0-b2-nodocs.tar.gz"
48-
CMAKE_SETTINGS_DIR: "{{.G_DEPS_CMAKE_SETTINGS_DIR}}"
49-
TARGETS:
50-
- "filesystem"
51-
- "iostreams"
52-
- "process"
53-
- "program_options"
54-
- "regex"
55-
- "system"
56-
57-
# Runs the bootstrap.sh generate step in the given source directory. Boost only supports
58-
# in-source generation and building.
59-
#
60-
# @param {string} SOURCE_DIR Project source directory.
61-
# @param {string} INSTALL_PREFIX Path prefix of where the project should be installed.
62-
# @param {string[]} TARGETS Target libraries to build.
63-
# @param {string[]} [EXTRA_ARGS] Any additional arguments to pass to the generate command.
64-
boost-generate:
65-
internal: true
66-
dir: "{{.SOURCE_DIR}}"
67-
cmds:
68-
- >-
69-
./bootstrap.sh
70-
--prefix="{{.INSTALL_PREFIX}}"
71-
--exec-prefix="{{.INSTALL_PREFIX}}"
72-
--with-libraries={{(join "," .TARGETS)}}
73-
{{- range .EXTRA_ARGS}}
74-
"{{.}}"
75-
{{- end}}
76-
77-
# Runs the b2 build step for boost. The caller must have previously called `generate` on
78-
# `SOURCE_DIR` for this task to succeed.
79-
#
80-
# @param {string} SOURCE_DIR Directory containing the boost source.
81-
# @param {string[]} [EXTRA_ARGS] Any additional arguments to pass to the build command.
82-
# @param {int} [JOBS] The maximum number of concurrent processes to use when building. If
83-
# omitted, the b2 default number is used. Before 1.76.0, the number was 1. Since 1.76.0, the
84-
# default is the number of cores.
85-
boost-build:
86-
internal: true
87-
dir: "{{.SOURCE_DIR}}"
88-
cmds:
89-
- >-
90-
./b2
91-
{{- range .EXTRA_ARGS}}
92-
"{{.}}"
93-
{{- end}}
94-
{{- if .JOBS}}
95-
"-j{{.JOBS}}"
96-
{{- end}}
97-
98-
# Runs the b2 install step for boost. The caller must have previously called `build` on
99-
# `SOURCE_DIR` for this task to succeed. If `CMAKE_SETTINGS_DIR` is set, a settings file will be
100-
# created in that directory, containing a `boost_ROOT` CMake variable that points to
101-
# `INSTALL_PREFIX`.
102-
#
103-
# @param {string} SOURCE_DIR Directory containing the boost source.
104-
# @param {string} INSTALL_PREFIX Path prefix of where the project should be installed.
105-
# @param {string} [CMAKE_SETTINGS_DIR] If set, the directory where the project's CMake settings
106-
# file should be stored.
107-
# @param {string[]} [EXTRA_ARGS] Any additional arguments to pass to the install command.
108-
boost-install:
109-
internal: true
110-
dir: "{{.SOURCE_DIR}}"
111-
cmds:
112-
- >-
113-
./b2
114-
install
115-
{{- range .EXTRA_ARGS}}
116-
"{{.}}"
117-
{{- end}}
118-
- >-
119-
{{- if .CMAKE_SETTINGS_DIR}}
120-
echo "set(BOOST_ROOT
121-
\"{{.INSTALL_PREFIX}}\"
122-
CACHE PATH
123-
\"Package root for boost.\"
124-
)" >> "{{.CMAKE_SETTINGS_DIR}}/boost.cmake"
125-
{{- end}}
126-
127-
# Downloads boost from `URL` and installs boost.
128-
#
129-
# General parameters
130-
# @param {string} [WORK_DIR={{.TASK_DIR}}] Base directory to store the install and src
131-
# directories inside.
132-
# @param {string} [SOURCE_DIR={{.WORK_DIR}}/boost-src] Directory in which to extract the tar
133-
# file.
134-
#
135-
# Download parameters
136-
# @param {string} FILE_SHA256 Content hash to verify the downloaded tar file against.
137-
# @param {string} URL
138-
#
139-
# Boost generate parameters
140-
# @param {string} [INSTALL_PREFIX={{.WORK_DIR}}/boost-install] Path prefix of where the project
141-
# should be installed.
142-
# @param {string[]} TARGETS Target libraries to build.
143-
# @param {string[]} [GEN_ARGS] Any additional arguments to pass to the generate command.
144-
#
145-
# Boost build parameters
146-
# @param {int} [JOBS] The maximum number of concurrent processes to use when building. If
147-
# omitted, the b2 default number is used. Before 1.76.0, the number was 1. Since 1.76.0, the
148-
# default is the number of cores.
149-
# @param {string[]} [BUILD_ARGS] Any additional arguments to pass to the build command.
150-
#
151-
# Boost install parameters
152-
# @param {string[]} [INSTALL_ARGS] Any additional arguments to pass to the install command.
153-
# @param {string} [CMAKE_SETTINGS_DIR] If set, the directory where the project's CMake settings
154-
# file should be stored.
155-
boost-download-and-install:
156-
internal: true
157-
label: "{{.TASK}}:{{.URL}}-{{.INSTALL_PREFIX}}"
158-
vars:
159-
# General parameters
160-
WORK_DIR: >-
161-
{{default .ROOT_DIR .WORK_DIR}}
162-
SOURCE_DIR: >-
163-
{{default (printf "%s/boost-src" .WORK_DIR) .SOURCE_DIR}}
164-
165-
# Boost generate parameters
166-
INSTALL_PREFIX: >-
167-
{{default (printf "%s/boost-install" .WORK_DIR) .INSTALL_PREFIX}}
168-
TARGETS:
169-
ref: "default (list) .TARGETS"
170-
GEN_ARGS:
171-
ref: "default (list) .GEN_ARGS"
172-
173-
# Boost build parameters
174-
BUILD_ARGS:
175-
ref: "default (list) .BUILD_ARGS"
176-
JOBS: >-
177-
{{default "" .JOBS}}
178-
179-
# Boost install parameters
180-
INSTALL_ARGS:
181-
ref: "default (list) .INSTALL_ARGS"
182-
CMAKE_SETTINGS_DIR: >-
183-
{{default "" .CMAKE_SETTINGS_DIR}}
184-
requires:
185-
vars: ["FILE_SHA256", "URL"]
186-
deps:
187-
- task: ":utils:remote:download-and-extract-tar"
188-
vars:
189-
FILE_SHA256: "{{.FILE_SHA256}}"
190-
OUTPUT_DIR: "{{.SOURCE_DIR}}"
191-
URL: "{{.URL}}"
192-
cmds:
193-
- task: "boost-generate"
194-
vars:
195-
SOURCE_DIR: "{{.SOURCE_DIR}}"
196-
INSTALL_PREFIX: "{{.INSTALL_PREFIX}}"
197-
TARGETS:
198-
ref: ".TARGETS"
199-
EXTRA_ARGS:
200-
ref: ".GEN_ARGS"
201-
- task: "boost-build"
202-
vars:
203-
SOURCE_DIR: "{{.SOURCE_DIR}}"
204-
JOBS: "{{.JOBS}}"
205-
EXTRA_ARGS:
206-
ref: ".BUILD_ARGS"
207-
- task: "boost-install"
208-
vars:
209-
SOURCE_DIR: "{{.SOURCE_DIR}}"
210-
INSTALL_PREFIX: "{{.INSTALL_PREFIX}}"
211-
CMAKE_SETTINGS_DIR: "{{.CMAKE_SETTINGS_DIR}}"
212-
EXTRA_ARGS:
213-
ref: ".INSTALL_ARGS"
48+
WORK_DIR: "{{.G_DEPS_DIR}}/boost"

taskfiles/lint-cmake.yaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ tasks:
1515
- exclude: "{{.ROOT_DIR}}/**/CMakeFiles/*"
1616
- exclude: "{{.ROOT_DIR}}/**/submodules/*"
1717
- exclude: "{{.ROOT_DIR}}/**/tools/*"
18-
19-
# Exclude CMake build directories generated by CLion
20-
- exclude: "{{.ROOT_DIR}}/**/cmake-build-*"
2118
deps:
2219
- "venv"
2320
cmds:
@@ -51,14 +48,8 @@ tasks:
5148
- |-
5249
. "{{.G_LINT_VENV_DIR}}/bin/activate"
5350
find . \
54-
\( \
55-
-path '**/build' \
56-
-o -path '**/cmake-build-*' \
57-
-o -path '**/cmake_install.cmake' \
58-
-o -path '**/CMakeFiles' \
59-
-o -path '**/submodules' \
60-
-o -path '**/tools' \
61-
\) -prune -o \
51+
\( -path '**/build' -o -path '**/cmake_install.cmake' -o -path '**/CMakeFiles' \
52+
-o -path '**/submodules' -o -path '**/tools' \) -prune -o \
6253
\( -iname "CMakeLists.txt" -o -iname "*.cmake" -o -iname "*.cmake.in" \) \
6354
-print0 | \
6455
xargs -0 gersemi {{.FLAGS}}

0 commit comments

Comments
 (0)