You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Beman.Optional26: C++26 Extensions for std::optional](#bemanoptional26-c26-extensions-for-stdoptional)
19
+
*[Table of Contents](#table-of-contents)
20
+
*[License](#license)
21
+
*[Examples](#examples)
22
+
*[range\_loop](#range_loop)
23
+
*[optional\_ref](#optional_ref)
24
+
*[How to Build](#how-to-build)
25
+
*[Compiler Support](#compiler-support)
26
+
*[Dependencies](#dependencies)
27
+
*[Instructions](#instructions)
28
+
*[Preset CMake Flows](#preset-cmake-flows)
29
+
*[Custom CMake Flows](#custom-cmake-flows)
30
+
*[Build and Run Tests](#build-and-run-tests)
31
+
*[Build Production, but Skip Tests](#build-production-but-skip-tests)
32
+
*[Papers](#papers)
33
+
16
34
## License
17
35
18
36
Source is licensed with the Apache 2.0 license with LLVM exceptions
@@ -123,7 +141,7 @@ apt-get install \
123
141
124
142
Full set of supported toolchains can be found in [.github/workflows/ci.yml](.github/workflows/ci.yml).
125
143
126
-
#### Basic Build
144
+
#### Preset CMake Flows
127
145
128
146
This project strives to be as normal and simple a CMake project as possible. This build workflow in particular will work, producing a static `beman_optional26` library, ready to package:
129
147
@@ -168,15 +186,56 @@ Total Test time (real) = 0.09 sec
168
186
169
187
This should build and run the tests with GCC 14 with the address and undefined behavior sanitizers enabled.
170
188
171
-
#### More complex cases
189
+
#### Custom CMake Flows
190
+
191
+
##### Build and Run Tests
172
192
173
-
The CMake preset system suffers from combinitorial explosion. There is a makefile in the root of the repository to aid in running more configurations.
193
+
CI current build and test flows:
174
194
175
195
```shell
176
-
make -k TOOLCHAIN=clang-18 CONFIG=Tsan VERBOSE=1
196
+
# Configure build: default build production code + tests (BUILD_TESTING=ON by default).
$ ctest --build-config Asan --output-on-failure --test-dir .build
209
+
Internal ctest changing into directory: /path/to/Optional26/.build
210
+
Test project /path/to/Optional26/.build
211
+
...
212
+
100% tests passed, 0 tests failed out of 82
213
+
214
+
Total Test time (real) = 0.67 sec
177
215
```
178
216
179
-
The makefile will use your system compiler, `c++`, if no toolchain name is provided, otherwise it will use the toolchain in the etc/ directory to perform the build. The Ninja multi config generator is used, with configurations for `RelWithDebugInfo`, `Debug`, `Tsan`, and `Asan` configured by default.
217
+
##### Build Production, but Skip Tests
218
+
219
+
By default, we build and run tests. You can provide `-DBUILD_TESTING=OFF` and completely disable building tests:
220
+
221
+
```shell
222
+
# Configure build: build production code, skip tests (BUILD_TESTING=OFF).
0 commit comments