Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
98 lines (81 sloc) 3.72 KB
# - Config file for the INMOST package
# It defines the following variables
# INMOST_INCLUDE_DIRS - include directories for INMOST and dependencies
# INMOST_LIBRARY_DIRS - library directories for INMOST and dependencies
# INMOST_LIBRARIES - libraries to link against
# INMOST_COMPILE_FLAGS - flags to set to compiler (generally inherited from MPI)
# INMOST_LINK_FLAGS - flags to set to linker (generally inherited from MPI)
# Compute paths
get_filename_component(inmost_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(INMOST_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@")
if(NOT TARGET inmost AND NOT INMOST_BINARY_DIR)
if( EXISTS "${inmost_DIR}/cmake/inmost-targets.cmake" )
include("${inmost_DIR}/cmake/inmost-targets.cmake")
elseif( EXISTS "${inmost_DIR}/inmost-targets.cmake" )
include("${inmost_DIR}/inmost-targets.cmake")
elseif( EXISTS "${inmost_DIR}/CMakeFiles/Exports/cmake/inmost-targets.cmake")
include("${inmost_DIR}/CMakeFiles/Exports/cmake/inmost-targets.cmake")
endif()
endif()
set(INMOST_LIBRARY_DIRS "${inmost_DIR}")
set(INMOST_LIBRARIES inmost)
set(USE_MPI @USE_MPI@)
set(USE_OMP @USE_OMP@)
set(USE_PARTITIONER_ZOLTAN @USE_PARTITIONER_ZOLTAN@)
set(USE_PARTITIONER_PARMETIS @USE_PARTITIONER_PARMETIS@)
set(USE_SOLVER_MONDRIAAN @USE_SOLVER_MONDRIAAN@)
set(USE_SOLVER_METIS @USE_SOLVER_METIS@)
set(USE_SOLVER_TRILINOS @USE_SOLVER_TRILINOS@)
set(USE_SOLVER_PETSC @USE_SOLVER_PETSC@)
set(USE_SOLVER_SUPERLU @USE_SOLVER_SUPERLU@)
set(USE_MT @USE_MT@)
if( USE_OMP )
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} @OpenMP_C_FLAGS@")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} @OpenMP_CXX_FLAGS@")
endif( USE_OMP )
if( USE_MPI )
list(APPEND INMOST_INCLUDE_DIRS "@MPI_INCLUDE_PATH@")
list(APPEND INMOST_COMPILE_FLAGS "@MPI_COMPILE_FLAGS@")
list(APPEND INMOST_LIBRARIES "@MPI_LIBRARIES@")
list(APPEND INMOST_LINK_FLAGS "@MPI_LINK_FLAGS@")
endif( USE_MPI )
if( USE_PARTITIONER_ZOLTAN )
list(APPEND INMOST_LIBRARIES "@ZOLTAN_LIBRARIES@")
list(APPEND INMOST_INCLUDE_DIRS "@ZOLTAN_INCLUDE_DIRS@")
endif( USE_PARTITIONER_ZOLTAN )
if( USE_PARTITIONER_PARMETIS )
list(APPEND INMOST_LIBRARIES "@PARMETIS_LIBRARIES@")
list(APPEND INMOST_INCLUDE_DIRS "@PARMETIS_INCLUDE_DIR@")
list(APPEND INMOST_INCLUDE_DIRS "@METIS_INCLUDE_DIR@")
endif( USE_PARTITIONER_PARMETIS )
if( USE_SOLVER_MONDRIAAN )
list(APPEND INMOST_LIBRARIES "@MONDRIAAN_LIBRARIES@")
list(APPEND INMOST_INCLUDE_DIRS "@MONDRIAAN_INCLUDE_DIRS@")
list(APPEND INMOST_LIBRARY_DIRS "@MONDRIAAN_LIBRARY_DIRS@")
endif( USE_SOLVER_MONDRIAAN )
if( USE_SOLVER_METIS )
list(APPEND INMOST_LIBRARIES "@METIS_LIBRARIES@")
list(APPEND INMOST_INCLUDE_DIRS "@METIS_INCLUDE_DIR@")
endif( USE_SOLVER_METIS )
if( USE_SOLVER_TRILINOS )
list(APPEND INMOST_LIBRARIES "@Trilinos_LIBRARIES@")
list(APPEND INMOST_LIBRARIES "@Trilinos_TPL_LIBRARIES@")
list(APPEND INMOST_LIBRARY_DIRS "@Trilinos_LIBRARY_DIRS@")
list(APPEND INMOST_LIBRARY_DIRS "@Trilinos_TPL_LIBRARY_DIRS@")
list(APPEND INMOST_INCLUDE_DIRS "@Trilinos_INCLUDE_DIRS@")
list(APPEND INMOST_INCLUDE_DIRS "@Trilinos_TPL_INCLUDE_DIRS@")
if(MSVC)
message("Putting workaround for Visual Studio that allow to use Trilinos Release libraries in Debug mode")
message("Note that this workaround may affect your debugging experience, you may want to debug without Trilinos")
list(APPEND INMOST_DEFINITIONS "-D_ITERATOR_DEBUG_LEVEL=0")
endif(MSVC)
endif( USE_SOLVER_TRILINOS )
if( USE_SOLVER_SUPERLU )
list(APPEND INMOST_LIBRARIES "@SUPERLU_LIBRARIES@")
list(APPEND INMOST_INCLUDE_DIRS "@SUPERLU_INCLUDES@")
endif( USE_SOLVER_SUPERLU )
if( USE_SOLVER_PETSC )
list(APPEND INMOST_LIBRARIES "@PETSC_LIBRARIES@")
list(APPEND INMOST_LIBRARY_DIRS "@PETSC_LIBRARY_DIRS@")
list(APPEND INMOST_INCLUDE_DIRS "@PETSC_INCLUDES@")
endif( USE_SOLVER_PETSC )