From 5ea206b2b8d1504bf9a8a4652abb1e413f2ba1f2 Mon Sep 17 00:00:00 2001
From: NAUD Maxence <maxence.naud@cea.fr>
Date: Sun, 19 Jan 2025 12:14:11 +0000
Subject: [PATCH] UPD: log in some tests and make fmt PUBLIC in CMakeLists.txt
 for python installation

---
 CMakeLists.txt                            | 2 +-
 src/graph/Node.cpp                        | 2 +-
 src/recipes/MatMulToFC.cpp                | 2 +-
 unit_tests/operator/Test_Squeeze_Op.cpp   | 6 +++---
 unit_tests/operator/Test_Unsqueeze_Op.cpp | 6 +++---
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 565ebad55..9e09a0eab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -125,7 +125,7 @@ if (PYBIND)
     add_pybind_dependency(${module_name})
     ##
 
-    target_link_libraries(${pybind_module_name} PRIVATE fmt::fmt)
+    target_link_libraries(${pybind_module_name} PUBLIC fmt::fmt)
 endif()
 
 target_link_libraries(${module_name} PUBLIC fmt::fmt)
diff --git a/src/graph/Node.cpp b/src/graph/Node.cpp
index 384e946c6..0c5fbfdcb 100644
--- a/src/graph/Node.cpp
+++ b/src/graph/Node.cpp
@@ -264,7 +264,7 @@ void Aidge::Node::addChildOp(std::shared_ptr<Node> otherNode, const IOIndex_t ou
         "Output index (#{}) of the node {} (of type {}) is out of bound (it has {} outputs), when trying to add the child node {} (of type {})",
         outId, name(), type(), nbOutputs(), otherNode->name(), otherNode->type());
     if (otherNode->input(otherInId).second != gk_IODefaultIndex) {
-        Log::notice("Notice: the {}-th Parent of the child node {} (of type {}) already existed", otherInId, otherNode->name(), otherNode->type());
+        Log::notice("the {}-th Parent of the child node {} (of type {}) already existed", otherInId, otherNode->name(), otherNode->type());
     }
     // manage tensors and potential previous parent
     otherNode->setInputId(otherInId, outId);
diff --git a/src/recipes/MatMulToFC.cpp b/src/recipes/MatMulToFC.cpp
index 8d902c680..c35b2a64a 100644
--- a/src/recipes/MatMulToFC.cpp
+++ b/src/recipes/MatMulToFC.cpp
@@ -71,7 +71,7 @@ void Aidge::matMulToFC(std::shared_ptr<Aidge::Node> matmulNode, std::shared_ptr<
     {
         // If both inputs are producers, there is an ambiguity, but both options
         // result in a correct solution.
-        Log::notice("Notice: both MatMul inputs are Producers, assume data at input#0 and weights at input#1.");
+        Log::notice("both MatMul inputs are Producers, assume data at input#0 and weights at input#1.");
         weight = matmulNode->getParent(1);
     }
     AIDGE_ASSERT(weight != nullptr, "Could not deduce weight input for MatMul operator.");
diff --git a/unit_tests/operator/Test_Squeeze_Op.cpp b/unit_tests/operator/Test_Squeeze_Op.cpp
index f5fd07198..f1261fffb 100644
--- a/unit_tests/operator/Test_Squeeze_Op.cpp
+++ b/unit_tests/operator/Test_Squeeze_Op.cpp
@@ -446,9 +446,9 @@ TEST_CASE("[core/operator] Squeeze(forward)", "[Squeeze][forward]") {
 
         delete[] array_in;
       }
-    fmt::print("INFO: GlobalAveragePooling total execution time: {}µs\n", duration.count());
-    fmt::print("INFO: Number of operations : {}\n", number_of_operation);
-    fmt::print("INFO: Operation / µs = {}\n", number_of_operation / duration.count());
+    Log::info("GlobalAveragePooling total execution time: {}µs\n", duration.count());
+    Log::info("Number of operations : {}\n", number_of_operation);
+    Log::info("Operation / µs = {}\n", number_of_operation / duration.count());
     }
   }
 }
diff --git a/unit_tests/operator/Test_Unsqueeze_Op.cpp b/unit_tests/operator/Test_Unsqueeze_Op.cpp
index 650cbaf3e..5cedcfdfa 100644
--- a/unit_tests/operator/Test_Unsqueeze_Op.cpp
+++ b/unit_tests/operator/Test_Unsqueeze_Op.cpp
@@ -373,9 +373,9 @@ TEST_CASE("[core/operator] Unsqueeze(forward)", "[Unsqueeze][forward]") {
         delete[] array_in;
       }
     }
-    fmt::print("INFO: GlobalAveragePooling total execution time: {}µs\n", duration.count());
-    fmt::print("INFO: Number of operations : {}\n", number_of_operation);
-    fmt::print("INFO: Operation / µs = {}\n", number_of_operation / duration.count());
+    Log::info("GlobalAveragePooling total execution time: {}µs\n", duration.count());
+    Log::info("Number of operations : {}\n", number_of_operation);
+    Log::info("Operation / µs = {}\n", number_of_operation / duration.count());
   }
 }
 
-- 
GitLab