@@ -7,31 +7,37 @@ message(STATUS "Third-party: creating target 'Trilinos::Trilinos'")
77find_package (Trilinos COMPONENTS ML Epetra)
88
99if (NOT Trilinos_FOUND)
10+ set (POLYSOLVE_WITH_TRILINOS OFF )
1011 message ("Trilinos not found." )
1112endif ()
1213
1314find_package (MPI)
1415
1516if (NOT MPI_FOUND)
17+ set (POLYSOLVE_WITH_TRILINOS OFF )
1618 message ("MPI not found." )
1719endif ()
1820
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 ()
3743endif ()
0 commit comments