catch_discover_tests needs to support relative paths
- Dominant language
- C++
- Stars
- 21.5k
- Forks
- 3.5k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 2
Description
**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" " [==[" "$" "]==]" "\n"
$ 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
Contributor guide
Research direction
Start in extras/Catch.cmake around the TEST_EXECUTABLE entry for DISCOVERY_MODE PRE_TEST. Trace how TARGET_FILE is used when generating _include.cmake files, then determine how the requested USE_RELATIVE_PATHS option should select relative paths. Done means PRE_TEST discovery can produce portable relative paths instead of build-time absolute paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100