Merge pull request 'Catch2 hotfix' (#177) from mueller/suppress-catch2-warning into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

Reviewed-on: #177
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
This commit is contained in:
Jakob Meier 2022-03-09 10:47:58 +01:00
commit 636dbda36b

View File

@ -37,8 +37,12 @@ endif()
include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake) include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake)
pre_project_config() pre_project_config()
# Check whether the user has already installed Catch2 first. This has to come before
# the project call. We could also exlcude doing this when the Q7S primary OBSW is built..
find_package(Catch2 3 CONFIG QUIET)
# Project Name # Project Name
project(eive-obsw ASM C CXX) project(eive-obsw)
################################################################################ ################################################################################
# Pre-Sources preparation # Pre-Sources preparation
@ -150,9 +154,6 @@ set(FSFW_ADDITIONAL_INC_PATHS
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
) )
# Check whether the user has already installed Catch2 first
find_package(Catch2 3)
################################################################################ ################################################################################
# Executable and Sources # Executable and Sources
################################################################################ ################################################################################
@ -199,8 +200,10 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(COMPILER_FLAGS "/permissive-") set(COMPILER_FLAGS "/permissive-")
endif() endif()
# Not installed, so use FetchContent to download and provide Catch2 # Not installed, so use FetchContent to download and provide Catch2
if(NOT Catch2_FOUND) if(NOT Catch2_FOUND)
message(STATUS "Did not find a valid Catch2 installation. Using FetchContent to install it")
include(FetchContent) include(FetchContent)
FetchContent_Declare( FetchContent_Declare(