From a6f1fd4c37b6838ecaf17367fb16e8e6db061eed Mon Sep 17 00:00:00 2001
From: Charles Villard <charles.villard@cea.fr>
Date: Tue, 3 Dec 2024 13:44:26 +0100
Subject: [PATCH] edit: fixed tests target with fmt link

---
 CMakeLists.txt            | 1 +
 unit_tests/CMakeLists.txt | 1 +
 2 files changed, 2 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61f021477..d04627d6d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,6 +52,7 @@ if(NOT fmt_FOUND)
         fmt
         GIT_REPOSITORY https://github.com/fmtlib/fmt.git
         GIT_TAG        ${FMT_VERSION}
+        OVERRIDE_FIND_PACKAGE
     )
 
     set(FMT_SYSTEM_HEADERS ON)
diff --git a/unit_tests/CMakeLists.txt b/unit_tests/CMakeLists.txt
index 2c0c746a4..8257a6063 100644
--- a/unit_tests/CMakeLists.txt
+++ b/unit_tests/CMakeLists.txt
@@ -63,6 +63,7 @@ endif()
 target_link_libraries(tests${module_name} PRIVATE ${module_name})
 
 target_link_libraries(tests${module_name} PRIVATE Catch2::Catch2WithMain)
+target_link_libraries(tests${module_name} PRIVATE fmt::fmt)
 
 list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
 include(CTest)
-- 
GitLab