Catch2 icon indicating copy to clipboard operation
Catch2 copied to clipboard

catch_discover_tests needs to support relative paths

Open agunashe opened this issue 2 months ago • 0 comments

Description catch_discover_tests needs to support relative paths. currently it populates _include.cmake files with absolute paths for DISCOVERY_MODE PRE_TEST. Making them relative allows user to seperate the build and execution on different platforms/systems. This allows portability of test artifacts.

Additional context https://github.com/catchorg/Catch2/blob/devel/extras/Catch.cmake#L263 - TEST_EXECUTABLE" " [==[" "$<TARGET_FILE:${TARGET}>" "]==]" "\n"

$<TARGET_FILE: ----> populates the absolute path during the build time. Which does not exist at execution runtime

Need to create a flag USE_RELATIVE_PATHS to allow user to pass relative paths instead of having them populated at build time

agunashe avatar Dec 02 '25 21:12 agunashe