diff options
| author | Leitwolf | 2026-11-18 03:25:46 +0300 |
|---|---|---|
| committer | GitHub | 2026-11-18 03:25:46 +0300 |
| commit | 89c8ed6229cb537b9c3511275bb75116b8126aa0 (patch) | |
| tree | 9368984516d3678f947aad2da3f8def1723757f6 /docs/progmasoft-catch3.md | |
| parent | d10868c9d0324f1817a67d5f3529b5d86050fb39 (diff) | |
| parent | e69ece56074c7a1a96d8db3b6b5a76ac2d872adc (diff) | |
| download | catch3-ci/fuzzing.tar.gz | |
Merge branch 'devel' into ci/fuzzingci/fuzzing
Diffstat (limited to 'docs/progmasoft-catch3.md')
| -rw-r--r-- | docs/progmasoft-catch3.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/progmasoft-catch3.md b/docs/progmasoft-catch3.md index 05948fd4..fadff6aa 100644 --- a/docs/progmasoft-catch3.md +++ b/docs/progmasoft-catch3.md @@ -179,6 +179,27 @@ find_package(Catch3 0.3 CONFIG REQUIRED) target_link_libraries(MyTests PRIVATE Catch3::Catch3WithMain) ``` +Without a build system, an installed Catch3 links by its name: the library is +`Catch3` and the one that brings `main` is `Catch3Main`, as `libCatch3.a` and +`libCatch3Main.a` (`Catch3.lib` and `Catch3Main.lib` on Windows). The released +archives and packages hold these release builds; a debug build made with +CMake is named apart, `Catch3d` and `Catch3Maind`. `Catch3Main` comes first, +since it uses `Catch3`: + +```sh +c++ -std=c++17 tests.cpp -lCatch3Main -lCatch3 +``` + +When Catch3 is installed outside the compiler's search paths, pkg-config +gives the same flags with the include and library directories: + +```sh +c++ -std=c++17 tests.cpp $(pkg-config --cflags --libs catch3-with-main) +``` + +The pkg-config modules are `catch3` and `catch3-with-main`. CMake, Meson, +Xmake and Premake build the files under the same names. + In the Bazel Central Registry, from 0.5.0 on, the module is `progmasoft_catch3`, for Bazel 8 and later: |