-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathtrilinos.cmake
37 lines (31 loc) · 1.22 KB
/
trilinos.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
if(TARGET Trilinos::Trilinos)
return()
endif()
message(STATUS "Third-party: creating target 'Trilinos::Trilinos'")
find_package(Trilinos COMPONENTS ML Epetra)
if(NOT Trilinos_FOUND)
message("Trilinos not found.")
endif()
find_package(MPI)
if(NOT MPI_FOUND)
message("MPI not found.")
endif()
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_TPL_LIST = ${Trilinos_TPL_LIST}")
MESSAGE(" Trilinos_TPL_LIBRARIES = ${Trilinos_TPL_LIBRARIES}")
MESSAGE(" Trilinos_BUILD_SHARED_LIBS = ${Trilinos_BUILD_SHARED_LIBS}")
MESSAGE("End of Trilinos details\n")
# include(trilinos)
if(TARGET Trilinos::Trilinos)
else()
add_library(trilinos INTERFACE)
add_library(Trilinos::Trilinos ALIAS trilinos)
target_include_directories(trilinos INTERFACE ${Trilinos_INCLUDE_DIRS} )
target_link_libraries(trilinos INTERFACE ${Trilinos_LIBRARIES} )
target_link_libraries(trilinos INTERFACE MPI::MPI_C MPI::MPI_CXX )
endif()