From 43eff52ebd1b79d854d329e24103281d0a6002d6 Mon Sep 17 00:00:00 2001 From: Damien Marchal Date: Mon, 12 Oct 2026 11:51:09 +0200 Subject: [PATCH 1/3] Add proper dependencies in Mapping/Testing --- Sofa/Component/Mapping/Testing/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sofa/Component/Mapping/Testing/CMakeLists.txt b/Sofa/Component/Mapping/Testing/CMakeLists.txt index 2a1c906b3a7..74726cbc9ca 100644 --- a/Sofa/Component/Mapping/Testing/CMakeLists.txt +++ b/Sofa/Component/Mapping/Testing/CMakeLists.txt @@ -17,4 +17,4 @@ set(SOURCE_FILES add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES}) target_include_directories(${PROJECT_NAME} PUBLIC src/) -target_link_libraries(${PROJECT_NAME} Sofa.Config Sofa.Simulation.Core) +target_link_libraries(${PROJECT_NAME} Sofa.Config Sofa.Simulation.Core Sofa.SimpleApi Sofa.Testing Sofa.Component.StateContainer) From c3d3d58fdd522400cbe73c6fa84416be965e391b Mon Sep 17 00:00:00 2001 From: Damien Marchal Date: Fri, 16 Oct 2026 13:26:39 +0200 Subject: [PATCH 2/3] Add all headers in empty.cpp to force checking the #include Fix other issues that pop's up when doing so. --- Sofa/Component/Mapping/Testing/CMakeLists.txt | 2 +- .../component/mapping/testing/Multi2MappingTestCreation.h | 2 +- .../Testing/src/sofa/component/mapping/testing/empty.cpp | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Sofa/Component/Mapping/Testing/CMakeLists.txt b/Sofa/Component/Mapping/Testing/CMakeLists.txt index 74726cbc9ca..119846c36e6 100644 --- a/Sofa/Component/Mapping/Testing/CMakeLists.txt +++ b/Sofa/Component/Mapping/Testing/CMakeLists.txt @@ -17,4 +17,4 @@ set(SOURCE_FILES add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES}) target_include_directories(${PROJECT_NAME} PUBLIC src/) -target_link_libraries(${PROJECT_NAME} Sofa.Config Sofa.Simulation.Core Sofa.SimpleApi Sofa.Testing Sofa.Component.StateContainer) +target_link_libraries(${PROJECT_NAME} Sofa.Config Sofa.Type Sofa.Sofa.DefaultType Sofa.Simulation.Core Sofa.Testing Sofa.SimpleApi Sofa.Component.StateContainer) diff --git a/Sofa/Component/Mapping/Testing/src/sofa/component/mapping/testing/Multi2MappingTestCreation.h b/Sofa/Component/Mapping/Testing/src/sofa/component/mapping/testing/Multi2MappingTestCreation.h index b975d89a2a1..43b192b74fe 100644 --- a/Sofa/Component/Mapping/Testing/src/sofa/component/mapping/testing/Multi2MappingTestCreation.h +++ b/Sofa/Component/Mapping/Testing/src/sofa/component/mapping/testing/Multi2MappingTestCreation.h @@ -32,7 +32,7 @@ using sofa::testing::NumericTest; #include #include #include -#include +#include #include #include diff --git a/Sofa/Component/Mapping/Testing/src/sofa/component/mapping/testing/empty.cpp b/Sofa/Component/Mapping/Testing/src/sofa/component/mapping/testing/empty.cpp index 109c1bda6e8..1702b3c6370 100644 --- a/Sofa/Component/Mapping/Testing/src/sofa/component/mapping/testing/empty.cpp +++ b/Sofa/Component/Mapping/Testing/src/sofa/component/mapping/testing/empty.cpp @@ -21,4 +21,9 @@ ******************************************************************************/ #include +/// Keep this here to force the reading of the header with the proper dependencies and see its work. +#include +#include +#include + SOFA_EXPORT_DYNAMIC_LIBRARY void init(){} From c7787b7e8819f9ca9346432451ec52f38639ed18 Mon Sep 17 00:00:00 2001 From: Damien Marchal Date: Fri, 16 Oct 2026 14:00:35 +0200 Subject: [PATCH 3/3] Fix all errors in Multi2MappingTestCreation.h After inclusion of the header in empty.cpp it appears this header was out of sync with a lot of sofa evolution. --- Sofa/Component/Mapping/Testing/CMakeLists.txt | 2 +- .../mapping/testing/Multi2MappingTestCreation.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Sofa/Component/Mapping/Testing/CMakeLists.txt b/Sofa/Component/Mapping/Testing/CMakeLists.txt index 119846c36e6..278555c8e9f 100644 --- a/Sofa/Component/Mapping/Testing/CMakeLists.txt +++ b/Sofa/Component/Mapping/Testing/CMakeLists.txt @@ -17,4 +17,4 @@ set(SOURCE_FILES add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES}) target_include_directories(${PROJECT_NAME} PUBLIC src/) -target_link_libraries(${PROJECT_NAME} Sofa.Config Sofa.Type Sofa.Sofa.DefaultType Sofa.Simulation.Core Sofa.Testing Sofa.SimpleApi Sofa.Component.StateContainer) +target_link_libraries(${PROJECT_NAME} Sofa.Config SceneCreator Sofa.Type Sofa.Simulation.Core Sofa.Testing Sofa.SimpleApi Sofa.Component.StateContainer) diff --git a/Sofa/Component/Mapping/Testing/src/sofa/component/mapping/testing/Multi2MappingTestCreation.h b/Sofa/Component/Mapping/Testing/src/sofa/component/mapping/testing/Multi2MappingTestCreation.h index 43b192b74fe..7f5eb4499a4 100644 --- a/Sofa/Component/Mapping/Testing/src/sofa/component/mapping/testing/Multi2MappingTestCreation.h +++ b/Sofa/Component/Mapping/Testing/src/sofa/component/mapping/testing/Multi2MappingTestCreation.h @@ -39,15 +39,15 @@ using sofa::testing::NumericTest; #include #include +#include namespace sofa { namespace { using namespace core; using namespace component; -using defaulttype::Vec; -using defaulttype::Mat; +using type::Vec; +using type::Mat; using sofa::type::vector; -typedef std::size_t Index; /** Test suite for Multi2Mapping. */ @@ -99,10 +99,10 @@ struct Multi2Mapping_test : public BaseSimulationTest, NumericTest Multi2Mapping; - typedef component::linearsolver::EigenSparseMatrix SparseJMatrixEigen1; - typedef component::linearsolver::EigenSparseMatrix SparseJMatrixEigen2; - typedef linearsolver::EigenSparseMatrix SparseKMatrixEigen1; - typedef linearsolver::EigenSparseMatrix SparseKMatrixEigen2; + typedef sofa::linearalgebra::EigenSparseMatrix SparseJMatrixEigen1; + typedef sofa::linearalgebra::EigenSparseMatrix SparseJMatrixEigen2; + typedef sofa::linearalgebra::EigenSparseMatrix SparseKMatrixEigen1; + typedef sofa::linearalgebra::EigenSparseMatrix SparseKMatrixEigen2; Multi2Mapping* mapping; ///< the mapping to be tested vector in1Dofs; ///< mapping input @@ -203,7 +203,7 @@ struct Multi2Mapping_test : public BaseSimulationTest, NumericTestinit(root); + sofa::simulation::node::init(root); /// Apply the mapping // --- Use of the method apply