Skip to content

Commit

Permalink
Merge pull request #13973 from tamiko/fix_trilinos_checks_02
Browse files Browse the repository at this point in the history
CMake: Use deal.II's global index type in Tpetra compatibility test
  • Loading branch information
tamiko committed Jun 14, 2022
2 parents 1776d64 + 611f482 commit a42bb0d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmake/configure/configure_20_trilinos.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,22 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var)
# supply the correct compiler and linker flags:
ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_LINKER_FLAGS}")

IF(DEAL_II_WITH_64BIT_INDICES)
SET(_global_index_type "std::uint64_t")
ELSE()
SET(_global_index_type "unsigned int")
ENDIF()

CHECK_CXX_SOURCE_COMPILES(
"
#include <cstdint>
#include <Tpetra_Vector.hpp>
int
main()
{
using LO = int;
using GO = unsigned int;
using GO = ${_global_index_type};
using map_type = Tpetra::Map<LO, GO>;
Teuchos::RCP<const map_type> dummy_map = Teuchos::rcp(new map_type());
Tpetra::Vector<double, LO, GO> dummy_vector(dummy_map);
Expand Down

0 comments on commit a42bb0d

Please sign in to comment.