`FetchContent` doesn't include `contrib` directory as part of `CMAKE_MODULE_PATH`. This results into `include(Catch)` to fail. This patch just updates the documentation describing how to do include the path, so the new users don't have to figure this out themselves.
Source: https://github.com/catchorg/Catch2/issues/2103#issuecomment-730626324
Parsing C++ with regex in CMake is error prone and regularly leads to silently
dropped (not run) test cases.
Going forward the function `catch_discover_tests` from `contrib/CMake.cmake`
should be used.
For more information see https://github.com/catchorg/Catch2/issues/2092#issuecomment-747342765
* Update cmake-integration.md
CMake related, mainly more modern and provide an executable to be correct
Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
This variable is set to allow the use of the nice ParseAndAddCatchTests script
in the case where a launcher is needed to execute the script.
This is introduced to allow to launch unit tests using mpi. In this case one can
write for instance
set(OptionalCatchTestLauncher ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${NUMPROC})
before calling the ParseAndAddCatchTests function.
This might prove helpful when the package managers either doesn't
have Catch at all, or provides it in obsolete version (Ubuntu 16.04,
I am looking at you).
Closes#1383