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
Describe the bug
When Catch2 is installed using Conan into a project using CMake, and the project uses a multi-config generator such as "Ninja Multi-Config", building the project results in linker errors having to do with missing references to Catch2 symbols.
Expected behavior
Project should link successfully.
Reproduction steps
Install Catch2 using Conan:
[test_requires]
catch2/3.6.0
Use Conan's CMake integration to find and link against Catch2:
FAILED: Debug/xxx_test
...
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../lib/Scrt1.o: in function `_start':
(.text+0x1b): undefined reference to `main'
/usr/bin/ld: CMakeFiles/xxx_test.dir/Debug/test/XXX.test.cpp.o: in function `CATCH2_INTERNAL_TEST_0()':
/home/tom/projects/xxx/projects/xxx/test/XXX.test.cpp:6:(.text+0x4e): undefined reference to `Catch::ReusableStringStream::ReusableStringStream()'
...
Platform information:
OS: Arch Linux
Compiler+version: GCC v14.1.1
Catch version: v3.6.0
Conan version: 2.5.0
Additional context
When changing the generator to "Ninja" things work as expected.
The following comment exists in Catch2-Target-release.cmake:
# FIXME: What is the result of this for multi-config? All configs adding themselves to path?
The text was updated successfully, but these errors were encountered:
Describe the bug
When Catch2 is installed using Conan into a project using CMake, and the project uses a multi-config generator such as "Ninja Multi-Config", building the project results in linker errors having to do with missing references to Catch2 symbols.
Expected behavior
Project should link successfully.
Reproduction steps
Platform information:
Additional context
Catch2-Target-release.cmake
:The text was updated successfully, but these errors were encountered: