Catch2 hotfix #177

Merged
meierj merged 3 commits from mueller/suppress-catch2-warning into develop 2022-03-09 10:47:59 +01:00
Owner

The cleanest solution would be to specify in the build generation whether unittests or the primary OBSW is built. This is because the one generated Makefile now works for both unittest compilation and cross-compilation, but I don't think CMake was designed for this.

the project call will load the toolchain file, which messes up the regular search paths for CMake modules. Even when one configures the toolchain file to also search in the host path, CMake will rightfully not accept the Catch2 installation, probably because of the architecture missmatch. It probably assumes that the goal is the cross-compilation of the unittest.

Clean solution would be to only call find_package if unittests are built. For this, the cleanest soluton is the one suggested up top: Specify -DBUILD_UNITTESTS=ON during build generation and use that flag.

The cleanest solution would be to specify in the build generation whether unittests or the primary OBSW is built. This is because the one generated Makefile now works for both unittest compilation and cross-compilation, but I don't think CMake was designed for this. the `project` call will load the toolchain file, which messes up the regular search paths for CMake modules. Even when one configures the toolchain file to also search in the host path, CMake will rightfully not accept the Catch2 installation, probably because of the architecture missmatch. It probably assumes that the goal is the cross-compilation of the unittest. Clean solution would be to only call `find_package` if unittests are built. For this, the cleanest soluton is the one suggested up top: Specify `-DBUILD_UNITTESTS=ON` during build generation and use that flag.
muellerr added 1 commit 2022-03-09 09:28:21 +01:00
suppress Catch2 warning
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
39b4393b13
muellerr requested review from meierj 2022-03-09 09:28:26 +01:00
muellerr changed title from suppress Catch2 warning to WIP: suppress Catch2 warning 2022-03-09 09:32:22 +01:00
muellerr removed review request for meierj 2022-03-09 09:32:27 +01:00
muellerr added 1 commit 2022-03-09 09:37:01 +01:00
added status message
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
8cf3220cd0
muellerr added 1 commit 2022-03-09 10:18:16 +01:00
fixes some issues
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
bfc8d8a7c4
muellerr changed title from WIP: suppress Catch2 warning to Catch2 hotfix 2022-03-09 10:21:32 +01:00
muellerr requested review from meierj 2022-03-09 10:21:37 +01:00
meierj approved these changes 2022-03-09 10:47:55 +01:00
meierj merged commit 636dbda36b into develop 2022-03-09 10:47:59 +01:00
Sign in to join this conversation.
No description provided.