cmake_minimum_required (VERSION 3.17) project (Elements) find_package(MPI REQUIRED) SET(CMAKE_PREFIX_PATH ./Trilinos/build/lib/cmake/Trilinos ${CMAKE_PREFIX_PATH}) FIND_PACKAGE(Trilinos 13.1 REQUIRED) # Make sure to use same compilers and flags as Trilinos SET(CMAKE_CXX_COMPILER ${Trilinos_CXX_COMPILER} ) SET(CMAKE_C_COMPILER ${Trilinos_C_COMPILER} ) SET(CMAKE_Fortran_COMPILER ${Trilinos_Fortran_COMPILER} ) set(CMAKE_CXX_FLAGS "${Trilinos_CXX_COMPILER_FLAGS} ${CMAKE_CXX_FLAGS}") set(CMAKE_C_FLAGS "${Trilinos_C_COMPILER_FLAGS} ${CMAKE_C_FLAGS}") set(CMAKE_Fortran_FLAGS "${Trilinos_Fortran_COMPILER_FLAGS} ${CMAKE_Fortran_FLAGS}") # Echo trilinos build info MESSAGE("\nFound Trilinos! Here are the details: ") MESSAGE(" Trilinos_DIR = ${Trilinos_DIR}") MESSAGE(" Trilinos_VERSION = ${Trilinos_VERSION}") MESSAGE(" Trilinos_PACKAGE_LIST = ${Trilinos_PACKAGE_LIST}") MESSAGE(" Trilinos_LIBRARIES = ${Trilinos_LIBRARIES}") MESSAGE(" Trilinos_INCLUDE_DIRS = ${Trilinos_INCLUDE_DIRS}") MESSAGE(" Trilinos_LIBRARY_DIRS = ${Trilinos_LIBRARY_DIRS}") MESSAGE(" Trilinos_TPL_LIST = ${Trilinos_TPL_LIST}") MESSAGE(" Trilinos_TPL_INCLUDE_DIRS = ${Trilinos_TPL_INCLUDE_DIRS}") MESSAGE(" Trilinos_TPL_LIBRARIES = ${Trilinos_TPL_LIBRARIES}") MESSAGE(" Trilinos_TPL_LIBRARY_DIRS = ${Trilinos_TPL_LIBRARY_DIRS}") MESSAGE(" Trilinos_BUILD_SHARED_LIBS = ${Trilinos_BUILD_SHARED_LIBS}") MESSAGE("End of Trilinos details\n") include_directories(MATAR) include_directories(Include) include_directories(Elements) INCLUDE_DIRECTORIES (${Trilinos_INCLUDE_DIRS} ${Trilinos_TPL_INCLUDE_DIRS}) LINK_DIRECTORIES (${Trilinos_LIBRARY_DIRS} ${Trilinos_TPL_LIBRARY_DIRS}) if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo) # set(CMAKE_BUILD_TYPE Release) endif(NOT CMAKE_BUILD_TYPE) add_subdirectory(MATAR) add_subdirectory(Elements) add_subdirectory(Solvers) add_definitions(-DHAVE_KOKKOS=1 -DTRILINOS_INTERFACE=1)