CMake installs catch into top-level source dir
envgap__microsoft__GSL-538
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
2b8d20425e990c5a3e9a0158e2cedacbcdf9e522- Manifest
tests/CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
microsoft/GSL #538 · read the original issue
The `CMAKE_INSTALL_PREFIX` for catch [is set to](https://github.com/Microsoft/GSL/blob/be43c79742dc36ee55b21c5d531a5ff301d0ef8d/tests/CMakeLists.txt#L9) `${CMAKE_SOURCE_DIR}`. I believe the intention is to place the catch/catch.hpp file in the GSL/include directory. However, if GSL is built from another project with eg. `add_subdirectory`, `CMAKE_SOURCE_DIR` is the top-level source directory and not the GSL directory, so catch is installed in the wrong place (and can't be found by the tests, etc).
I'm using `${CMAKE_CURRENT_SOURCE_DIR}/..` instead.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]