Skip to content

Commit f9d7122

Browse files
committed
add docs
1 parent 142195a commit f9d7122

File tree

1 file changed

+56
-1
lines changed

1 file changed

+56
-1
lines changed

README.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,62 @@ TODO: tested platforms.
8080
8181
### Instructions
8282
83-
<!-- TODO: add preset support -->
83+
#### Using CMake Preset
84+
85+
[CMake Preset](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html)
86+
is a new CMake functionality that provides one-line configure + test.
87+
88+
You can use `gcc-debug` to setup a debug orienated `inplace_vector` development environment.
89+
90+
```text
91+
$ cmake --workflow --preset gcc-debug
92+
Executing workflow step 1 of 3: configure preset "gcc-debug"
93+
94+
Preset CMake variables:
95+
96+
BEMAN_BUILDSYS_SANITIZER="MaxSan"
97+
CMAKE_BUILD_TYPE="Debug"
98+
CMAKE_CXX_STANDARD="20"
99+
CMAKE_TOOLCHAIN_FILE="cmake/gnu-toolchain.cmake"
100+
101+
-- The CXX compiler identification is GNU 14.2.0
102+
....
103+
-- Generating done (0.0s)
104+
-- Build files have been written to: /inplace_vector/build/gcc-debug
105+
106+
Executing workflow step 2 of 3: build preset "gcc-debug"
107+
108+
[8/20] Building CXX object tests/beman/inplace_vector/CMakeFiles/beman.inplace_vector.tests.erasure.dir/erasure.test.cpp.o
109+
110+
Executing workflow step 3 of 3: test preset "gcc-debug"
111+
112+
Test project /home/bradwu/Desktop/inplace_vector/build/gcc-debug
113+
Start 1: beman.inplace_vector.test
114+
1/54 Test #1: beman.inplace_vector.test .................................... Passed 0.03 sec
115+
Start 2: beman.inplace_vector.ref-test
116+
2/54 Test #2: beman.inplace_vector.ref-test ................................ Passed 0.03 sec
117+
Start 3: ContainerRequirements/*.ValueType
118+
3/54 Test #3: ContainerRequirements/*.ValueType ............................ Passed 0.15 sec
119+
Start 4: ContainerRequirements/*.Reference
120+
...
121+
50/54 Test #50: SizeNCapacity/*.ResizeDown ................................... Passed 0.05 sec
122+
Start 51: SizeNCapacity/*.ResizeUp
123+
51/54 Test #51: SizeNCapacity/*.ResizeUp ..................................... Passed 0.05 sec
124+
Start 52: Data/*.Test
125+
52/54 Test #52: Data/*.Test .................................................. Passed 0.05 sec
126+
Start 53: Erasure/*.ByValue
127+
53/54 Test #53: Erasure/*.ByValue ............................................***Skipped 0.04 sec
128+
Start 54: Erasure/*.ByPred
129+
54/54 Test #54: Erasure/*.ByPred .............................................***Skipped 0.04 sec
130+
131+
100% tests passed, 0 tests failed out of 54
132+
133+
Total Test time (real) = 6.20 sec
134+
```
135+
136+
Note that this workflow compiles the project with sanitizers,
137+
if you wish to playaround with `inplace_vector` without sanitizers,
138+
use `gcc-release`.
84139

85140
#### Manual CMake Build
86141

0 commit comments

Comments
 (0)