From 39b4393b13ef27c5e48ed664ca59eed33a4fc459 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 9 Mar 2022 09:27:16 +0100 Subject: [PATCH 1/3] suppress Catch2 warning --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03d51ac2..e6c07ee5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,7 +151,7 @@ set(FSFW_ADDITIONAL_INC_PATHS ) # Check whether the user has already installed Catch2 first -find_package(Catch2 3) +find_package(Catch2 3 QUIET) ################################################################################ # Executable and Sources -- 2.43.0 From 8cf3220cd0b1a9ae481330699a1b5e597f067cfc Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 9 Mar 2022 09:36:52 +0100 Subject: [PATCH 2/3] added status message --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6c07ee5..dadf7234 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,9 +150,6 @@ set(FSFW_ADDITIONAL_INC_PATHS ${CMAKE_CURRENT_BINARY_DIR} ) -# Check whether the user has already installed Catch2 first -find_package(Catch2 3 QUIET) - ################################################################################ # Executable and Sources ################################################################################ @@ -199,8 +196,12 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(COMPILER_FLAGS "/permissive-") endif() +# Check whether the user has already installed Catch2 first +find_package(Catch2 3 QUIET) + # Not installed, so use FetchContent to download and provide Catch2 if(NOT Catch2_FOUND) + message(STATUS "Did not find a valid Catch2 installation. Using FetchContent to install it") include(FetchContent) FetchContent_Declare( -- 2.43.0 From bfc8d8a7c4e03ee64dccd0c9b0eed104454c98ab Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 9 Mar 2022 10:14:59 +0100 Subject: [PATCH 3/3] fixes some issues --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dadf7234..b959b5a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,8 +37,12 @@ endif() include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake) 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(eive-obsw ASM C CXX) +project(eive-obsw) ################################################################################ # Pre-Sources preparation @@ -196,8 +200,6 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(COMPILER_FLAGS "/permissive-") endif() -# Check whether the user has already installed Catch2 first -find_package(Catch2 3 QUIET) # Not installed, so use FetchContent to download and provide Catch2 if(NOT Catch2_FOUND) -- 2.43.0