diff --git a/CMakeLists.txt b/CMakeLists.txt index 757b45e5..dd3c4322 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -666,6 +666,11 @@ if (ENABLE_TRILINOS) set( TRILINOS_CXX_COMPILER ${CMAKE_CURRENT_BINARY_DIR}/trilinos/src/trilinos/packages/kokkos/bin/nvcc_wrapper ) endif() + set( TRILINOS_ENABLE_SERIAL ON ) + if( ENABLE_OPENMP OR ENABLE_CUDA ) + set( TRILINOS_ENABLE_SERIAL OFF ) + endif() + ExternalProject_Add( trilinos PREFIX ${PROJECT_BINARY_DIR}/trilinos URL ${TRILINOS_URL} @@ -721,7 +726,7 @@ if (ENABLE_TRILINOS) -D KOKKOS_ENABLE_CUDA_LAMBDA:BOOL=${ENABLE_CUDA} -D KOKKOS_ENABLE_CUDA_UVM:BOOL=${ENABLE_CUDA} -D Tpetra_ENABLE_CUDA:BOOL=${ENABLE_CUDA} - -D Tpetra_INST_SERIAL:BOOL=ON + -D Tpetra_INST_SERIAL:BOOL=${TRILINOS_ENABLE_SERIAL} -D Tpetra_INST_INT_LONG_LONG:BOOL=ON -D Tpetra_INST_INT_INT:BOOL=OFF -D Tpetra_INST_DOUBLE:BOOL=ON @@ -729,6 +734,7 @@ if (ENABLE_TRILINOS) -D Belos_ENABLE_Tpetra:BOOL=ON -D Belos_ENABLE_Epetra:BOOL=OFF -D Belos_ENABLE_Xpetra:BOOL=OFF + -D Ifpack2_ENABLE_ThyraTpetraAdapters:BOOL=OFF ${TRILINOS_EXTRA_ARGS} )