From: Daniel Arndt Date: Thu, 23 Feb 2023 23:37:01 +0000 (-0500) Subject: restrict Tpetra instantiaitions further X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6466628ac740b98b25f778d76a60d46ead0bd65c;p=dealii.git restrict Tpetra instantiaitions further --- diff --git a/cmake/configure/configure_20_trilinos.cmake b/cmake/configure/configure_20_trilinos.cmake index b13a0a7224..a91ca1bf3c 100644 --- a/cmake/configure/configure_20_trilinos.cmake +++ b/cmake/configure/configure_20_trilinos.cmake @@ -264,15 +264,19 @@ macro(feature_trilinos_find_external var) TRILINOS_TPETRA_IS_FUNCTIONAL ) - reset_cmake_required() - - if(NOT TRILINOS_TPETRA_IS_FUNCTIONAL) + if(TRILINOS_TPETRA_IS_FUNCTIONAL) + check_cxx_symbol_exists(HAVE_TPETRA_INST_FLOAT "TpetraCore_config.h" DEAL_II_HAVE_TPETRA_INST_FLOAT) + check_cxx_symbol_exists(HAVE_TPETRA_INST_DOUBLE "TpetraCore_config.h" DEAL_II_HAVE_TPETRA_INST_DOUBLE) + check_cxx_symbol_exists(HAVE_TPETRA_INST_COMPLEX_FLOAT "TpetraCore_config.h" DEAL_II_HAVE_TPETRA_INST_COMPLEX_FLOAT) + check_cxx_symbol_exists(HAVE_TPETRA_INST_COMPLEX_DOUBLE "TpetraCore_config.h" DEAL_II_HAVE_TPETRA_INST_COMPLEX_DOUBLE) + else() message( STATUS "Tpetra was found but is not usable! Disabling Tpetra support." ) set(TRILINOS_WITH_TPETRA OFF) endif() + reset_cmake_required() endif() if(TRILINOS_WITH_MUELU) @@ -421,12 +425,21 @@ macro(feature_trilinos_configure_external) set(DEAL_II_EXPAND_TRILINOS_MPI_BLOCKVECTOR "TrilinosWrappers::MPI::BlockVector") set(DEAL_II_EXPAND_TRILINOS_MPI_VECTOR "TrilinosWrappers::MPI::Vector") set(DEAL_II_EXPAND_EPETRA_VECTOR "LinearAlgebra::EpetraWrappers::Vector") + if(${DEAL_II_TRILINOS_WITH_TPETRA}) - set(DEAL_II_EXPAND_TPETRA_VECTOR_DOUBLE "LinearAlgebra::TpetraWrappers::Vector") - set(DEAL_II_EXPAND_TPETRA_VECTOR_FLOAT "LinearAlgebra::TpetraWrappers::Vector") + if (DEAL_II_HAVE_TPETRA_INST_DOUBLE) + set(DEAL_II_EXPAND_TPETRA_VECTOR_DOUBLE "LinearAlgebra::TpetraWrappers::Vector") + endif() + if (DEAL_II_HAVE_TPETRA_INST_FLOAT) + set(DEAL_II_EXPAND_TPETRA_VECTOR_FLOAT "LinearAlgebra::TpetraWrappers::Vector") + endif() if(${DEAL_II_WITH_COMPLEX_NUMBERS}) - set(DEAL_II_EXPAND_TPETRA_VECTOR_COMPLEX_DOUBLE "LinearAlgebra::TpetraWrappers::Vector>") - set(DEAL_II_EXPAND_TPETRA_VECTOR_COMPLEX_FLOAT "LinearAlgebra::TpetraWrappers::Vector>") + if(DEAL_II_HAVE_TPETRA_INST_COMPLEX_DOUBLE) + set(DEAL_II_EXPAND_TPETRA_VECTOR_COMPLEX_DOUBLE "LinearAlgebra::TpetraWrappers::Vector>") + endif() + if(DEAL_II_HAVE_TPETRA_INST_COMPLEX_FLOAT) + set(DEAL_II_EXPAND_TPETRA_VECTOR_COMPLEX_FLOAT "LinearAlgebra::TpetraWrappers::Vector>") + endif() endif() endif()