Closed Laguna1989 closed 5 months ago
The catch2 framework was recently upgraded to catch2 v3. The folder structure and files have been changed. There is no header
#include <catch2/catch.hpp>
anymore, but it should be
#include <catch2/catch_test_macros.hpp>
This leads to errors with this line when compiling.
Example output (generated with g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 and cmake version 3.27.7.
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
cmake version 3.27.7
FAILED: .../main.cpp.o /usr/bin/c++ -I/<project_root>/cmake-build-debug/_deps/rapidcheck-src/extras/catch/include -I/<project_root>/impl/object_lib -I/<project_root>/cmake-build-debug/_deps/rapidcheck-src/include -I/<project_root>/cmake-build-debug/_deps/catch2-src/src/catch2/.. -I/<project_root>/cmake-build-debug/_deps/catch2-build/generated-includes -I/<project_root>/cmake-build-debug/_deps/approvaltests-src/ApprovalTests/.. -I/<project_root>/cmake-build-debug/_deps/approvaltests-src/ApprovalTests -g -fdiagnostics-color=always -MD -MT .../main.cpp.o -MF .../main.cpp.o.d -o .../main.cpp.o -c /<project_root>/test/object_lib_lib_test/main.cpp In file included from /<project_root>/cmake-build-debug/_deps/approvaltests-src/ApprovalTests/../ApprovalTests/ApprovalTests.hpp:70, from /<project_root>/test/object_lib_lib_test/main.cpp:2: /<project_root>/cmake-build-debug/_deps/approvaltests-src/ApprovalTests/../ApprovalTests/integrations/catch/Catch2Approvals.h:18:10: fatal error: catch2/catch.hpp: No such file or directory 18 | #include <catch2/catch.hpp> | ^~~~~~~~~~~~~~~~~~ compilation terminated. [31/35] Building CXX object _deps/approvaltests-build/ApprovalTests/CMakeFiles/ApprovalTests.dir/reporters/ReporterFactory.cpp.o ninja: build stopped: subcommand failed.
This is reproducible for the latest tag v.10.12.2 as well as for the current master (d46d1903dc6d8d404da4e4026910e26df5fd3a6e)
v.10.12.2
master
Thank you, yes this needs to be done.
We have an earlier report in #156 - and need to figure out how to maintain support for both Catch2 v2 and Catch2 v3.
Fixed with #221
The catch2 framework was recently upgraded to catch2 v3. The folder structure and files have been changed. There is no header
anymore, but it should be
This leads to errors with this line when compiling.
Example output (generated with
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
andcmake version 3.27.7
.This is reproducible for the latest tag
v.10.12.2
as well as for the currentmaster
(d46d1903dc6d8d404da4e4026910e26df5fd3a6e)