diff options
| author | Leitwolf11 | 2026-11-17 22:00:16 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-11-17 22:00:16 +0300 |
| commit | 0f987a33220d3217a4e3e8416ce413f9983e3aa0 (patch) | |
| tree | be5fad6dc9621404418a1793139050f6ad5bb2f6 /.github | |
| parent | 95e2cad52aa1dd573ea0e6075af0fdd49c30a78a (diff) | |
| download | catch3-build/catch3-link-names.tar.gz | |
Keep the debug "d": a debug build is not the same librarybuild/catch3-link-names
The previous commit dropped CMake's DEBUG_POSTFIX on every platform. A
debug build is a different library from a release build, so it keeps its
own name, libCatch3d and libCatch3Maind. The released archives and the
Progmasoft Linux packages hold release builds, which are libCatch3 and
libCatch3Main, so an installed Catch3 links with -lCatch3 and -lCatch3Main.
The Ubuntu install job links with -lCatch3Maind -lCatch3d in its Debug
rows and with -lCatch3Main -lCatch3 in its Release rows; pkg-config gives
the right names in both. The documentation names both.
Checked locally: a Release install gives libCatch3.a and libCatch3Main.a, a
Debug install libCatch3d.a and libCatch3Maind.a; a test links and passes
with each, and pkg-config prints the matching flags.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/linux-builds.yml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/.github/workflows/linux-builds.yml b/.github/workflows/linux-builds.yml index 877b1501..16be72a1 100644 --- a/.github/workflows/linux-builds.yml +++ b/.github/workflows/linux-builds.yml @@ -74,14 +74,19 @@ jobs: #include <Progmasoft/Catch3.hpp> TEST_CASE("an installed Catch3 links by its name") { REQUIRE(1 + 1 == 2); } EOF + # A debug build is named apart with a "d". + d="" + if [ "$BUILD_TYPE" = Debug ]; then d=d; fi clang++ -std=c++${{matrix.std}} -I"$prefix/include" "$RUNNER_TEMP/consumer/test.cpp" \ - -L"$prefix/lib" -lCatch3Main -lCatch3 -o "$RUNNER_TEMP/consumer/by-name" + -L"$prefix/lib" "-lCatch3Main$d" "-lCatch3$d" -o "$RUNNER_TEMP/consumer/by-name" "$RUNNER_TEMP/consumer/by-name" export PKG_CONFIG_PATH="$prefix/share/pkgconfig" # shellcheck disable=SC2046 # pkg-config prints several flags. clang++ -std=c++${{matrix.std}} "$RUNNER_TEMP/consumer/test.cpp" \ $(pkg-config --cflags --libs catch3-with-main) -o "$RUNNER_TEMP/consumer/by-pkg-config" "$RUNNER_TEMP/consumer/by-pkg-config" + env: + BUILD_TYPE: ${{matrix.build_type}} thread-sanitizer: name: Ubuntu 26.04, C++17, ThreadSanitizer and UBSan |