Commit e03f4747 authored by Antonio Cervone's avatar Antonio Cervone
Browse files

use ${Trilinos_INCLUDE_DIRS} for trilinos include dir

parent d7c5bce0
......@@ -18,14 +18,14 @@ SET(CMAKE_C_COMPILER ${Trilinos_C_COMPILER} )
SET(CMAKE_Fortran_COMPILER ${Trilinos_Fortran_COMPILER} )
# Set all the include directories to compile against Trilinos and its dependencies
SET (Trilinos_INCLUDE_DIR ${Trilinos_DIR} ${Trilinos_TPL_INCLUDE_DIRS})
SET (Trilinos_INCLUDE_DIR ${Trilinos_INCLUDE_DIRS} ${Trilinos_TPL_INCLUDE_DIRS})
# Now we created the list of all the Trilinos libraries and TPL we need to link agaist to
#First I define the directory where Trilinos libs are
SET( tmp "-L${Trilinos_ROOT}/lib")
SET( tmp "-L${Trilinos_ROOT}/lib")
# Then I concatenate all the Trilinos libraries -lXXXX
FOREACH(LIB_FILE ${Trilinos_LIBRARIES})
SET (tmp "${tmp} -l${LIB_FILE}")
SET (tmp "${tmp} -l${LIB_FILE}")
ENDFOREACH(LIB_FILE ${Trilinos_LIBRARIES})
#Finally I set Trilinos_LIBRARIES to be the set of Trilinos libraries plus the other TPL of Trilinos
SET (Trilinos_LIBRARIES ${tmp} ${Trilinos_TPL_LIBRARIES})
......@@ -35,24 +35,24 @@ SET (Trilinos_LIBRARIES ${tmp} ${Trilinos_TPL_LIBRARIES})
SET( REQUIRED_PACKAGES "amesos;anasazi;aztecoo;belos;epetra;epetraext;ifpack;ml;teuchos;zoltan")
#Now I check if all the required packages are in the list of Trilinos Packages. (This might be done better with a find...)
FOREACH( PACKAGE ${REQUIRED_PACKAGES})
STRING(TOUPPER ${PACKAGE} UPACK)
FOREACH(Tpack ${Trilinos_PACKAGE_LIST})
STRING(TOUPPER ${Tpack} TPACK)
IF(${UPACK} STREQUAL ${TPACK})
SET(${UPACK}_FOUND TRUE)
ENDIF()
ENDFOREACH(Tpack ${Trilinos_PACKAGE_LIST})
IF(${UPACK}_FOUND)
set( HAVE_TRILINOS_${UPACK} TRUE)
ELSE()
MESSAGE( FATAL_ERROR "Could not find ${PACKAGE}")
ENDIF()
STRING(TOUPPER ${PACKAGE} UPACK)
FOREACH(Tpack ${Trilinos_PACKAGE_LIST})
STRING(TOUPPER ${Tpack} TPACK)
IF(${UPACK} STREQUAL ${TPACK})
SET(${UPACK}_FOUND TRUE)
ENDIF()
ENDFOREACH(Tpack ${Trilinos_PACKAGE_LIST})
IF(${UPACK}_FOUND)
set( HAVE_TRILINOS_${UPACK} TRUE)
ELSE()
MESSAGE( FATAL_ERROR "Could not find ${PACKAGE}")
ENDIF()
ENDFOREACH(PACKAGE ${REQUIRED_PACKAGES})
#If XXX is already linked through Trilinos. If so I set the variable XXX_IS_IN_TRILINOS to true
FOREACH(tpl ${Trilinos_TPL_LIST})
STRING(TOUPPER ${tpl} TPL)
SET(${TPL}_IS_IN_TRILINOS TRUE)
set (HAVE_${TPL} TRUE)
MESSAGE( STATUS "Library ${TPL} already included through Trilinos" )
STRING(TOUPPER ${tpl} TPL)
SET(${TPL}_IS_IN_TRILINOS TRUE)
set (HAVE_${TPL} TRUE)
MESSAGE( STATUS "Library ${TPL} already included through Trilinos" )
ENDFOREACH(tpl ${Trilinos_TPL_LIST})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment