Skip to content

Commit

Permalink
Merge pull request #13457 from cgcgcg/thyraScalarTypeFix
Browse files Browse the repository at this point in the history
Thyra TpetraAdapters: Check that ETI matches Tpetra scalar types
  • Loading branch information
cgcgcg authored Sep 19, 2024
2 parents 7e3f11e + 283bead commit 850242f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/thyra/adapters/tpetra/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@

TRIBITS_SUBPACKAGE(TpetraAdapters)

ASSERT_DEFINED(
Thyra_ENABLE_EXPLICIT_INSTANTIATION
Tpetra_INST_FLOAT
Tpetra_INST_COMPLEX_DOUBLE
Tpetra_INST_COMPLEX_FLOAT
Teuchos_INST_FLOAT
Teuchos_INST_COMPLEX_DOUBLE
Teuchos_INST_COMPLEX_FLOAT
)

IF (Thyra_ENABLE_EXPLICIT_INSTANTIATION)

IF ((Tpetra_INST_FLOAT AND NOT Teuchos_INST_FLOAT) OR (NOT Tpetra_INST_FLOAT AND Teuchos_INST_FLOAT))
MESSAGE(FATAL_ERROR "Tpetra_INST_FLOAT=${Tpetra_INST_FLOAT} != Teuchos_INST_FLOAT=${Teuchos_INST_FLOAT}. The two need to match. Consider setting Trilinos_ENABLE_FLOAT instead of setting Tpetra_INST_FLOAT and/or Teuchos_INST_FLOAT individually.")
ENDIF()

IF ((Tpetra_INST_COMPLEX_FLOAT AND NOT Teuchos_INST_COMPLEX_FLOAT) OR (NOT Tpetra_INST_COMPLEX_FLOAT AND Teuchos_INST_COMPLEX_FLOAT))
MESSAGE(FATAL_ERROR "Tpetra_INST_COMPLEX_FLOAT=${Tpetra_INST_COMPLEX_FLOAT} != Teuchos_INST_COMPLEX_FLOAT=${Teuchos_INST_COMPLEX_FLOAT}. The two need to match. Consider setting Trilinos_ENABLE_COMPLEX_FLOAT instead of setting Tpetra_INST_COMPLEX_FLOAT and/or Teuchos_INST_COMPLEX_FLOAT individually.")
ENDIF()

IF ((Tpetra_INST_COMPLEX_DOUBLE AND NOT Teuchos_INST_COMPLEX_DOUBLE) OR (NOT Tpetra_INST_COMPLEX_DOUBLE AND Teuchos_INST_COMPLEX_DOUBLE))
MESSAGE(FATAL_ERROR "Tpetra_INST_COMPLEX_DOUBLE=${Tpetra_INST_COMPLEX_DOUBLE} != Teuchos_INST_COMPLEX_DOUBLE=${Teuchos_INST_COMPLEX_DOUBLE}. The two need to match. Consider setting Trilinos_ENABLE_COMPLEX_DOUBLE instead of setting Tpetra_INST_COMPLEX_DOUBLE and/or Teuchos_INST_COMPLEX_DOUBLE individually.")
ENDIF()

ENDIF()

ADD_SUBDIRECTORY(src)

TRIBITS_ADD_TEST_DIRECTORIES(test)
Expand Down

0 comments on commit 850242f

Please sign in to comment.