Skip to content

catch_discover_tests needs to support relative paths #3051

@agunashe

Description

@agunashe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions