added: zoltan support to build system
This commit is contained in:
1 parent
84fa0ce0c0
commit
41ce8928de
3 files changed
+66
No files matched your search
@@ -243,6 +243,17 @@ if(IFEM_USE_CEREAL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Zoltan
|
||||
if(IFEM_USE_ZOLTAN)
|
||||
find_package(ZOLTAN)
|
||||
if(ZOLTAN_FOUND)
|
||||
list(APPEND IFEM_DEPLIBS ${ZOLTAN_LIBRARIES})
|
||||
list(APPEND IFEM_DEPINCLUDES ${ZOLTAN_INCLUDE_DIRS})
|
||||
list(APPEND IFEM_DEFINITIONS -DHAS_ZOLTAN=1)
|
||||
message(STATUS "Zoltan support enabled")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Portability issues
|
||||
include(CheckFunctionExists)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS)
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
# -*-cmake-*-
|
||||
#
|
||||
# Try to find the libzoltan graph partioning library
|
||||
#
|
||||
# Once done, this will define:
|
||||
#
|
||||
# ZOLTAN_FOUND - system has the libzoltan graph partioning library
|
||||
# HAVE_ZOLTAN - like ZOLTAN_FOUND, but for the inclusion in config.h
|
||||
# ZOLTAN_INCLUDE_DIR - incude paths to use libzoltan
|
||||
# ZOLTAN_LIBRARIES - Link these to use libzoltan
|
||||
|
||||
set(ZOLTAN_SEARCH_PATH "/usr" "/usr/local" "/opt" "/opt/local")
|
||||
set(ZOLTAN_NO_DEFAULT_PATH "")
|
||||
if(ZOLTAN_ROOT)
|
||||
set(ZOLTAN_SEARCH_PATH "${ZOLTAN_ROOT}")
|
||||
set(ZOLTAN_NO_DEFAULT_PATH "NO_DEFAULT_PATH")
|
||||
endif()
|
||||
|
||||
# search for files which implements this module
|
||||
find_path (ZOLTAN_INCLUDE_DIRS
|
||||
NAMES "zoltan.h"
|
||||
PATHS ${ZOLTAN_SEARCH_PATH}
|
||||
PATH_SUFFIXES include trilinos
|
||||
${ZOLTAN_NO_DEFAULT_PATH})
|
||||
|
||||
# only search in architecture-relevant directory
|
||||
if (CMAKE_SIZEOF_VOID_P)
|
||||
math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}")
|
||||
endif (CMAKE_SIZEOF_VOID_P)
|
||||
|
||||
find_library(ZOLTAN_LIBRARIES
|
||||
NAMES zoltan trilinos_zoltan
|
||||
PATHS ${ZOLTAN_SEARCH_PATH}
|
||||
PATH_SUFFIXES "lib/.libs" "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}"
|
||||
${ZOLTAN_NO_DEFAULT_PATH})
|
||||
|
||||
set (ZOLTAN_FOUND FALSE)
|
||||
if (ZOLTAN_INCLUDE_DIRS OR ZOLTAN_LIBRARIES)
|
||||
set(ZOLTAN_FOUND TRUE)
|
||||
set(HAVE_ZOLTAN 1)
|
||||
set(ZOLTAN_LIBRARIES ${ZOLTAN_LIBRARIES} ${PARMETIS_LIBRARIES} ${PTSCOTCH_LIBRARIES})
|
||||
set(ZOLTAN_INCLUDE_DIRS ${ZOLTAN_INCLUDE_DIRS} ${PARMETIS_INCLUDE_DIRS}
|
||||
${PTSCOTCH_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
set (ZOLTAN_CONFIG_VAR HAVE_ZOLTAN)
|
||||
|
||||
# print a message to indicate status of this package
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ZOLTAN
|
||||
DEFAULT_MSG
|
||||
ZOLTAN_LIBRARIES
|
||||
ZOLTAN_INCLUDE_DIRS
|
||||
)
|
||||
@@ -12,6 +12,7 @@ OPTION(IFEM_USE_HDF5 "Compile with HDF5 support?" ON)
|
||||
OPTION(IFEM_USE_VTFWRITER "Compile with VTFWriter support?" ON)
|
||||
OPTION(IFEM_USE_UMFPACK "Compile with UMFPACK support?" ON)
|
||||
OPTION(IFEM_USE_CEREAL "Compile with cereal support?" ON)
|
||||
OPTION(IFEM_USE_ZOLTAN "Compile with zoltan support?" OFF)
|
||||
OPTION(IFEM_AS_SUBMODULE "Compile IFEM as a submodule of apps?" OFF)
|
||||
OPTION(IFEM_WHOLE_PROG_OPTIM "Compile IFEM with link-time optimizations?" OFF)
|
||||
OPTION(IFEM_TEST_MEMCHECK "Run tests through valgrind?" OFF)
|
||||
|
||||
Reference in new issue
Block a user