@@ -7,31 +7,37 @@ message(STATUS "Third-party: creating target 'Trilinos::Trilinos'")
7
7
find_package (Trilinos COMPONENTS ML Epetra)
8
8
9
9
if (NOT Trilinos_FOUND)
10
+ set (POLYSOLVE_WITH_TRILINOS OFF )
10
11
message ("Trilinos not found." )
11
12
endif ()
12
13
13
14
find_package (MPI)
14
15
15
16
if (NOT MPI_FOUND)
17
+ set (POLYSOLVE_WITH_TRILINOS OFF )
16
18
message ("MPI not found." )
17
19
endif ()
18
20
19
- MESSAGE ("\n Found Trilinos! Here are the details: " )
20
- MESSAGE (" Trilinos_DIR = ${Trilinos_DIR} " )
21
- MESSAGE (" Trilinos_VERSION = ${Trilinos_VERSION} " )
22
- MESSAGE (" Trilinos_PACKAGE_LIST = ${Trilinos_PACKAGE_LIST} " )
23
- MESSAGE (" Trilinos_LIBRARIES = ${Trilinos_LIBRARIES} " )
24
- MESSAGE (" Trilinos_INCLUDE_DIRS = ${Trilinos_INCLUDE_DIRS} " )
25
- MESSAGE (" Trilinos_TPL_LIST = ${Trilinos_TPL_LIST} " )
26
- MESSAGE (" Trilinos_TPL_LIBRARIES = ${Trilinos_TPL_LIBRARIES} " )
27
- MESSAGE (" Trilinos_BUILD_SHARED_LIBS = ${Trilinos_BUILD_SHARED_LIBS} " )
28
- MESSAGE ("End of Trilinos details\n " )
29
- # include(trilinos)
30
- if (TARGET Trilinos::Trilinos)
31
- else ()
32
- add_library (trilinos INTERFACE )
33
- add_library (Trilinos::Trilinos ALIAS trilinos)
34
- target_include_directories (trilinos INTERFACE ${Trilinos_INCLUDE_DIRS} )
35
- target_link_libraries (trilinos INTERFACE ${Trilinos_LIBRARIES} )
36
- target_link_libraries (trilinos INTERFACE MPI::MPI_C MPI::MPI_CXX )
21
+ if (Trilinos_FOUND)
22
+ if (MPI_FOUND)
23
+ MESSAGE ("\n Found Trilinos! Here are the details: " )
24
+ MESSAGE (" Trilinos_DIR = ${Trilinos_DIR} " )
25
+ MESSAGE (" Trilinos_VERSION = ${Trilinos_VERSION} " )
26
+ MESSAGE (" Trilinos_PACKAGE_LIST = ${Trilinos_PACKAGE_LIST} " )
27
+ MESSAGE (" Trilinos_LIBRARIES = ${Trilinos_LIBRARIES} " )
28
+ MESSAGE (" Trilinos_INCLUDE_DIRS = ${Trilinos_INCLUDE_DIRS} " )
29
+ MESSAGE (" Trilinos_TPL_LIST = ${Trilinos_TPL_LIST} " )
30
+ MESSAGE (" Trilinos_TPL_LIBRARIES = ${Trilinos_TPL_LIBRARIES} " )
31
+ MESSAGE (" Trilinos_BUILD_SHARED_LIBS = ${Trilinos_BUILD_SHARED_LIBS} " )
32
+ MESSAGE ("End of Trilinos details\n " )
33
+ # include(trilinos)
34
+ if (TARGET Trilinos::Trilinos)
35
+ else ()
36
+ add_library (trilinos INTERFACE )
37
+ add_library (Trilinos::Trilinos ALIAS trilinos)
38
+ target_include_directories (trilinos INTERFACE ${Trilinos_INCLUDE_DIRS} )
39
+ target_link_libraries (trilinos INTERFACE ${Trilinos_LIBRARIES} )
40
+ target_link_libraries (trilinos INTERFACE MPI::MPI_C MPI::MPI_CXX )
41
+ endif ()
42
+ endif ()
37
43
endif ()
0 commit comments