From 2a5c1a819b33d32a6cd71ef925370de4ed44d7af Mon Sep 17 00:00:00 2001 From: Samuel Browne Date: Thu, 7 Mar 2024 10:34:27 -0700 Subject: [PATCH 1/2] Make Teko and Tpetra required dependencies of Piro Note that this isn't 100% true. It looks like the Tpetra dependency comes in with ROL (which is optional), and the Teko dependency comes in with Tempus + ROL (which are optional). Given the discussion here: https://github.com/trilinos/Trilinos/issues/12799, we're going to make them both required dependencies for now to get past these combinatoric which-packages-are-enabled build issues. Also added some required test dependencies that I discovered while configuring the tests. --- packages/piro/cmake/Dependencies.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/piro/cmake/Dependencies.cmake b/packages/piro/cmake/Dependencies.cmake index d259b967dfe4..ea637c4b8bec 100644 --- a/packages/piro/cmake/Dependencies.cmake +++ b/packages/piro/cmake/Dependencies.cmake @@ -1,8 +1,7 @@ -# Can make Epetra & EpetraExt Optional in the future -SET(LIB_REQUIRED_DEP_PACKAGES Teuchos Stratimikos ThyraCore) +SET(LIB_REQUIRED_DEP_PACKAGES Teuchos Stratimikos ThyraCore Tpetra Teko) SET(LIB_OPTIONAL_DEP_PACKAGES NOX Tempus Stokhos - ROL Ifpack2 MueLu ThyraEpetraAdapters ThyraEpetraExtAdapters Epetra EpetraExt Tpetra Teko) -SET(TEST_REQUIRED_DEP_PACKAGES) + ROL Ifpack2 MueLu ThyraEpetraAdapters ThyraEpetraExtAdapters Epetra EpetraExt) +SET(TEST_REQUIRED_DEP_PACKAGES ThyraTpetraAdapters MPI) SET(TEST_OPTIONAL_DEP_PACKAGES) SET(LIB_REQUIRED_DEP_TPLS ) SET(LIB_OPTIONAL_DEP_TPLS) From 302440b08ec41c39e40dad7b5a0593fdb17462fc Mon Sep 17 00:00:00 2001 From: Samuel Browne Date: Thu, 7 Mar 2024 10:36:18 -0700 Subject: [PATCH 2/2] Stop asserting another package's internal variable Inappropriate to assert that NOX_ENABLE_Epetra is defined from within Piro if we may not be using NOX or Epetra. This is probably left over from when Epetra was a required dependency. Now, check for NOX and Epetra being enabled instead as part of the nicer if() conditional below. --- packages/piro/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/piro/CMakeLists.txt b/packages/piro/CMakeLists.txt index 238d0a9b8300..e1f4185075f3 100644 --- a/packages/piro/CMakeLists.txt +++ b/packages/piro/CMakeLists.txt @@ -31,8 +31,7 @@ GLOBAL_SET(HAVE_PIRO_TEKO ${${PACKAGE_NAME}_ENABLE_Teko}) ASSERT_DEFINED(${PACKAGE_NAME}_ENABLE_Stratimikos) GLOBAL_SET(HAVE_PIRO_STRATIMIKOS ${${PACKAGE_NAME}_ENABLE_Stratimikos}) -ASSERT_DEFINED(NOX_ENABLE_Epetra) -IF (${PACKAGE_NAME}_ENABLE_Epetra AND NOT NOX_ENABLE_Epetra) +IF (${PACKAGE_NAME}_ENABLE_Epetra AND ${PROJECT_NAME}_ENABLE_NOX AND NOT NOX_ENABLE_Epetra) MESSAGE(FATAL_ERROR "Piro configuration error: Enabling Epetra in Piro also requires that Epetra be enabled in NOX (-DNOX_ENABLE_Epetra:BOOL=ON)") ENDIF()