From 5fa023e10881ea917271727de8689b3915d85191 Mon Sep 17 00:00:00 2001 From: Steven Roberts Date: Fri, 22 Mar 2024 15:19:25 -0700 Subject: [PATCH 1/3] Fixes inclusion of manyvector examples when cmake option is disabled --- examples/arkode/CMakeLists.txt | 4 +++- examples/nvector/CMakeLists.txt | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/arkode/CMakeLists.txt b/examples/arkode/CMakeLists.txt index e7e064d327..defe97ed7c 100644 --- a/examples/arkode/CMakeLists.txt +++ b/examples/arkode/CMakeLists.txt @@ -17,7 +17,9 @@ # C examples if(EXAMPLES_ENABLE_C) add_subdirectory(C_serial) - add_subdirectory(C_manyvector) + if(BUILD_NVECTOR_MANYVECTOR) + add_subdirectory(C_manyvector) + endif() if(ENABLE_OPENMP AND OPENMP_FOUND) add_subdirectory(C_openmp) endif() diff --git a/examples/nvector/CMakeLists.txt b/examples/nvector/CMakeLists.txt index 4c954a351e..ea1e953ee2 100644 --- a/examples/nvector/CMakeLists.txt +++ b/examples/nvector/CMakeLists.txt @@ -34,7 +34,9 @@ target_link_libraries(test_nvector_obj PRIVATE sundials_nvecserial) if(ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(parallel) - add_subdirectory(mpimanyvector) + if(BUILD_NVECTOR_MANYVECTOR OR BUILD_NVECTOR_MPIMANYVECTOR) + add_subdirectory(mpimanyvector) + endif() add_subdirectory(mpiplusx) # Build the mpi nvector test utilities add_library(test_nvectormpi_obj OBJECT test_mpinvector.c) @@ -43,7 +45,9 @@ if(ENABLE_MPI AND MPI_C_FOUND) endif() target_link_libraries(test_nvectormpi_obj PRIVATE MPI::MPI_C sundials_nvecparallel) endif() -add_subdirectory(manyvector) +if(BUILD_NVECTOR_MANYVECTOR) + add_subdirectory(manyvector) +endif() if(BUILD_NVECTOR_PARHYP) add_subdirectory(parhyp) From c66b301fdabf2151882a33aba5d9f7dd1d6adb7d Mon Sep 17 00:00:00 2001 From: Steven Roberts Date: Fri, 22 Mar 2024 15:32:35 -0700 Subject: [PATCH 2/3] Add fix for CVODE --- examples/cvode/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/cvode/CMakeLists.txt b/examples/cvode/CMakeLists.txt index 30eb91a532..8f16a4ad2e 100644 --- a/examples/cvode/CMakeLists.txt +++ b/examples/cvode/CMakeLists.txt @@ -26,7 +26,9 @@ if(EXAMPLES_ENABLE_C) endif() if(ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(parallel) - add_subdirectory(C_mpimanyvector) + if(BUILD_NVECTOR_MANYVECTOR OR BUILD_NVECTOR_MPIMANYVECTOR) + add_subdirectory(C_mpimanyvector) + endif() endif() if(ENABLE_HYPRE AND HYPRE_FOUND) add_subdirectory(parhyp) From 978a92956dc8c765b14f9fa38e4abe2dc59a2e70 Mon Sep 17 00:00:00 2001 From: Steven Roberts Date: Fri, 22 Mar 2024 16:14:44 -0700 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: David Gardner --- examples/cvode/CMakeLists.txt | 2 +- examples/nvector/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/cvode/CMakeLists.txt b/examples/cvode/CMakeLists.txt index 8f16a4ad2e..f5bdfb8d78 100644 --- a/examples/cvode/CMakeLists.txt +++ b/examples/cvode/CMakeLists.txt @@ -26,7 +26,7 @@ if(EXAMPLES_ENABLE_C) endif() if(ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(parallel) - if(BUILD_NVECTOR_MANYVECTOR OR BUILD_NVECTOR_MPIMANYVECTOR) + if(BUILD_NVECTOR_MPIMANYVECTOR) add_subdirectory(C_mpimanyvector) endif() endif() diff --git a/examples/nvector/CMakeLists.txt b/examples/nvector/CMakeLists.txt index ea1e953ee2..54aa22f08d 100644 --- a/examples/nvector/CMakeLists.txt +++ b/examples/nvector/CMakeLists.txt @@ -34,7 +34,7 @@ target_link_libraries(test_nvector_obj PRIVATE sundials_nvecserial) if(ENABLE_MPI AND MPI_C_FOUND) add_subdirectory(parallel) - if(BUILD_NVECTOR_MANYVECTOR OR BUILD_NVECTOR_MPIMANYVECTOR) + if(BUILD_NVECTOR_MPIMANYVECTOR) add_subdirectory(mpimanyvector) endif() add_subdirectory(mpiplusx)