From aa7bf082e475149a433a54ab35dd7b99a479ac2d Mon Sep 17 00:00:00 2001 From: Zachary Sexton Date: Tue, 20 Oct 2026 10:57:07 -0700 Subject: [PATCH 1/2] Link threads, BLAS/LAPACK, and VTK more precisely Link the unit tests with the Threads::Threads target that find_package(Threads) already provides, require BLAS and LAPACK with 32-bit integers to match the solver's int arguments, and request only the five VTK modules the solver uses. --- Code/Source/solver/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Code/Source/solver/CMakeLists.txt b/Code/Source/solver/CMakeLists.txt index 2cf0eaf90..1e732091b 100644 --- a/Code/Source/solver/CMakeLists.txt +++ b/Code/Source/solver/CMakeLists.txt @@ -140,16 +140,18 @@ if(ENABLE_ARRAY_INDEX_CHECKING) endif() # svMultiPhysics requires LAPACK +set(BLA_SIZEOF_INTEGER 4) find_package(BLAS REQUIRED) find_package(LAPACK REQUIRED) # Include VTK either from a local build using SV_LOCAL_VTK_PATH # or from a default installed version. # +set(SV_VTK_COMPONENTS CommonCore CommonDataModel CommonMisc FiltersGeometry IOXML) if("${SV_LOCAL_VTK_PATH}" STREQUAL "") - find_package(VTK REQUIRED ) + find_package(VTK REQUIRED COMPONENTS ${SV_VTK_COMPONENTS}) else() - find_package(VTK PATHS ${SV_LOCAL_VTK_PATH} NO_DEFAULT_PATH REQUIRED) + find_package(VTK PATHS ${SV_LOCAL_VTK_PATH} NO_DEFAULT_PATH REQUIRED COMPONENTS ${SV_VTK_COMPONENTS}) endif() include(${VTK_USE_FILE}) @@ -419,7 +421,7 @@ if(ENABLE_UNIT_TEST) run_all_unit_tests gtest GTest::gtest_main - pthread # link pthread on ubuntu20 + Threads::Threads # link pthread on ubuntu20 ) # Define the path to the unit-test reference-data directory as a preprocessor From 77991c7e23f9678cad92693c856db9de5e2a6d74 Mon Sep 17 00:00:00 2001 From: Zachary Sexton Date: Wed, 28 Oct 2026 18:45:11 -0700 Subject: [PATCH 2/2] Remove outdated pthread comment --- Code/Source/solver/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Source/solver/CMakeLists.txt b/Code/Source/solver/CMakeLists.txt index a282fcf2e..8c8d5428f 100644 --- a/Code/Source/solver/CMakeLists.txt +++ b/Code/Source/solver/CMakeLists.txt @@ -422,7 +422,7 @@ if(ENABLE_UNIT_TEST) run_all_unit_tests gtest GTest::gtest_main - Threads::Threads # link pthread on ubuntu20 + Threads::Threads ) # Define the path to the unit-test reference-data directory as a preprocessor