Skip to content

Commit 8430517

Browse files
committed
update README
1 parent 85d5c39 commit 8430517

1 file changed

Lines changed: 116 additions & 38 deletions

File tree

README.md

Lines changed: 116 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -143,40 +143,121 @@ cmake --install build/gcc-release --prefix /opt/beman.exemplar
143143
<summary> Build beman.exemplar (verbose logs) </summary>
144144

145145
```shell
146-
# Configure beman.exemplar.
147-
$ cmake -B build -S . -DCMAKE_CXX_STANDARD=20
148-
-- The CXX compiler identification is GNU 13.2.0
146+
# Configure beman.exemplar via gcc-debug workflow for development.
147+
$ cmake --workflow --preset gcc-debug
148+
Executing workflow step 1 of 3: configure preset "gcc-debug"
149+
150+
Preset CMake variables:
151+
152+
CMAKE_BUILD_TYPE="Debug"
153+
CMAKE_CXX_COMPILER="g++"
154+
CMAKE_CXX_FLAGS="-fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined"
155+
CMAKE_CXX_STANDARD="20"
156+
157+
-- The CXX compiler identification is GNU 11.4.0
158+
-- Detecting CXX compiler ABI info
159+
-- Detecting CXX compiler ABI info - done
160+
-- Check for working CXX compiler: /usr/bin/g++ - skipped
161+
-- Detecting CXX compile features
162+
-- Detecting CXX compile features - done
163+
-- The C compiler identification is GNU 11.4.0
164+
-- Detecting C compiler ABI info
165+
-- Detecting C compiler ABI info - done
166+
-- Check for working C compiler: /usr/bin/cc - skipped
167+
-- Detecting C compile features
168+
-- Detecting C compile features - done
169+
-- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter
170+
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
171+
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
172+
-- Found Threads: TRUE
173+
-- Configuring done
174+
-- Generating done
175+
-- Build files have been written to: /home/runner/work/exemplar/exemplar/build/gcc-debug
176+
177+
Executing workflow step 2 of 3: build preset "gcc-debug"
178+
179+
[1/14] Building CXX object src/beman/exemplar/CMakeFiles/beman.exemplar.dir/identity.cpp.o
180+
[2/14] Linking CXX static library src/beman/exemplar/libbeman.exemplar.a
181+
[3/14] Building CXX object examples/CMakeFiles/beman.exemplar.examples.identity_direct_usage.dir/identity_direct_usage.cpp.o
182+
[4/14] Linking CXX executable examples/beman.exemplar.examples.identity_direct_usage
183+
[5/14] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
184+
[6/14] Building CXX object src/beman/exemplar/CMakeFiles/beman.exemplar.tests.dir/identity.t.cpp.o
185+
[7/14] Building CXX object _deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/src/gmock_main.cc.o
186+
[8/14] Building CXX object _deps/googletest-build/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
187+
[9/14] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
188+
[10/14] Linking CXX static library lib/libgtest.a
189+
[11/14] Linking CXX static library lib/libgtest_main.a
190+
[12/14] Linking CXX static library lib/libgmock.a
191+
[13/14] Linking CXX static library lib/libgmock_main.a
192+
[14/14] Linking CXX executable src/beman/exemplar/beman.exemplar.tests
193+
194+
Executing workflow step 3 of 3: test preset "gcc-debug"
195+
196+
Test project /home/runner/work/exemplar/exemplar/build/gcc-debug
197+
Start 1: IdentityTest.call_identity_with_int
198+
1/4 Test #1: IdentityTest.call_identity_with_int ........... Passed 0.13 sec
199+
Start 2: IdentityTest.call_identity_with_custom_type
200+
2/4 Test #2: IdentityTest.call_identity_with_custom_type ... Passed 0.01 sec
201+
Start 3: IdentityTest.compare_std_vs_beman
202+
3/4 Test #3: IdentityTest.compare_std_vs_beman ............. Passed 0.01 sec
203+
Start 4: IdentityTest.check_is_transparent
204+
4/4 Test #4: IdentityTest.check_is_transparent ............. Passed 0.01 sec
205+
206+
100% tests passed, 0 tests failed out of 4
207+
208+
Total Test time (real) = 0.18 sec
209+
210+
# Configure beman.exemplar via gcc-release workflow for direct usage.
211+
$ cmake --workflow --preset gcc-release
212+
Executing workflow step 1 of 3: configure preset "gcc-release"
213+
214+
Preset CMake variables:
215+
216+
CMAKE_BUILD_TYPE="RelWithDebInfo"
217+
CMAKE_CXX_COMPILER="g++"
218+
CMAKE_CXX_FLAGS="-O3"
219+
CMAKE_CXX_STANDARD="20"
220+
221+
-- The CXX compiler identification is GNU 11.4.0
149222
-- Detecting CXX compiler ABI info
150223
-- Detecting CXX compiler ABI info - done
151-
-- Check for working CXX compiler: /usr/bin/c++ - skipped
224+
-- Check for working CXX compiler: /usr/bin/g++ - skipped
152225
-- Detecting CXX compile features
153226
-- Detecting CXX compile features - done
154-
-- Configuring done (0.1s)
155-
-- Generating done (0.0s)
156-
-- Build files have been written to: /path/to/repo/build
157-
158-
# Build beman.exemplar.
159-
$ cmake --build build
160-
[ 10%] Building CXX object src/beman/exemplar/CMakeFiles/beman.exemplar.dir/identity.cpp.o
161-
[ 20%] Linking CXX static library libbeman.exemplar.a
162-
[ 20%] Built target beman.exemplar
163-
[ 30%] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
164-
[ 40%] Linking CXX static library ../../../lib/libgtest.a
165-
[ 40%] Built target gtest
166-
[ 50%] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
167-
[ 60%] Linking CXX static library ../../../lib/libgtest_main.a
168-
[ 60%] Built target gtest_main
169-
[ 70%] Building CXX object src/beman/exemplar/tests/CMakeFiles/beman.exemplar.Test.dir/identity.t.cpp.o
170-
[ 80%] Linking CXX executable beman.exemplar.Test
171-
[ 80%] Built target beman.exemplar.Test
172-
[ 90%] Building CXX object examples/CMakeFiles/identity_usage.dir/identity_usage.cpp.o
173-
[100%] Linking CXX executable identity_usage
174-
[100%] Built target identity_usage
175-
176-
# Run beman.exemplar tests.
177-
$ ctest --test-dir build
178-
Internal ctest changing into directory: /path/to/your/repo/build
179-
Test project /path/to/your/repo/build
227+
-- The C compiler identification is GNU 11.4.0
228+
-- Detecting C compiler ABI info
229+
-- Detecting C compiler ABI info - done
230+
-- Check for working C compiler: /usr/bin/cc - skipped
231+
-- Detecting C compile features
232+
-- Detecting C compile features - done
233+
-- Found Python3: /usr/bin/python3.10 (found version "3.10.12") found components: Interpreter
234+
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
235+
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
236+
-- Found Threads: TRUE
237+
-- Configuring done
238+
-- Generating done
239+
-- Build files have been written to: /home/runner/work/exemplar/exemplar/build/gcc-release
240+
241+
Executing workflow step 2 of 3: build preset "gcc-release"
242+
243+
[1/14] Building CXX object src/beman/exemplar/CMakeFiles/beman.exemplar.dir/identity.cpp.o
244+
[2/14] Linking CXX static library src/beman/exemplar/libbeman.exemplar.a
245+
[3/14] Building CXX object examples/CMakeFiles/beman.exemplar.examples.identity_direct_usage.dir/identity_direct_usage.cpp.o
246+
[4/14] Linking CXX executable examples/beman.exemplar.examples.identity_direct_usage
247+
[5/14] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
248+
[6/14] Building CXX object src/beman/exemplar/CMakeFiles/beman.exemplar.tests.dir/identity.t.cpp.o
249+
[7/14] Building CXX object _deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/src/gmock_main.cc.o
250+
[8/14] Building CXX object _deps/googletest-build/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
251+
[9/14] Building CXX object _deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
252+
[10/14] Linking CXX static library lib/libgtest.a
253+
[11/14] Linking CXX static library lib/libgtest_main.a
254+
[12/14] Linking CXX static library lib/libgmock.a
255+
[13/14] Linking CXX executable src/beman/exemplar/beman.exemplar.tests
256+
[14/14] Linking CXX static library lib/libgmock_main.a
257+
258+
Executing workflow step 3 of 3: test preset "gcc-release"
259+
260+
Test project /home/runner/work/exemplar/exemplar/build/gcc-release
180261
Start 1: IdentityTest.call_identity_with_int
181262
1/4 Test #1: IdentityTest.call_identity_with_int ........... Passed 0.00 sec
182263
Start 2: IdentityTest.call_identity_with_custom_type
@@ -190,9 +271,8 @@ Test project /path/to/your/repo/build
190271

191272
Total Test time (real) = 0.01 sec
192273

193-
194274
# Run examples.
195-
$ build/exemplar/beman.exemplar.examples.identity_direct_usage
275+
$ build/gcc-release/examples/beman.exemplar.examples.identity_direct_usage
196276
2024
197277

198278
```
@@ -204,14 +284,12 @@ $ build/exemplar/beman.exemplar.examples.identity_direct_usage
204284

205285
```shell
206286
# Install build artifacts from `build` directory into `opt/beman.exemplar` path.
207-
$ cmake --install build --prefix /opt/beman.exemplar
208-
-- Install configuration: ""
287+
$ cmake --install build/gcc-release --prefix /opt/beman.exemplar
288+
-- Install configuration: "RelWithDebInfo"
209289
-- Up-to-date: /opt/beman.exemplar/lib/libbeman.exemplar.a
210-
-- Up-to-date: /opt/beman.exemplar/include
211-
-- Up-to-date: /opt/beman.exemplar/include/beman
212-
-- Up-to-date: /opt/beman.exemplar/include/beman/exemplar
213290
-- Up-to-date: /opt/beman.exemplar/include/beman/exemplar/identity.hpp
214291

292+
215293
# Check tree.
216294
$ tree /opt/beman.exemplar
217295
/opt/beman.exemplar
@@ -222,7 +300,7 @@ $ tree /opt/beman.exemplar
222300
└── lib
223301
└── libbeman.exemplar.a
224302

225-
5 directories, 2 files
303+
4 directories, 2 files
226304
```
227305

228306
</details>

0 commit comments

Comments
 (0)