Prevent Zoltan vars from growing with multiple find_package.
This commit is contained in:
parent
20e3202067
commit
2a2a9748a3
@ -24,7 +24,7 @@ find_package(PTScotch)
|
||||
#find_package(ParMETIS)
|
||||
|
||||
# search for files which implements this module
|
||||
find_path (ZOLTAN_INCLUDE_DIRS
|
||||
find_path (ZOLTAN_INCLUDE_DIR
|
||||
NAMES "zoltan.h"
|
||||
PATHS ${ZOLTAN_SEARCH_PATH}
|
||||
PATH_SUFFIXES include trilinos
|
||||
@ -35,7 +35,7 @@ if (CMAKE_SIZEOF_VOID_P)
|
||||
math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}")
|
||||
endif (CMAKE_SIZEOF_VOID_P)
|
||||
|
||||
find_library(ZOLTAN_LIBRARIES
|
||||
find_library(ZOLTAN_LIBRARY
|
||||
NAMES zoltan trilinos_zoltan
|
||||
PATHS ${ZOLTAN_SEARCH_PATH}
|
||||
PATH_SUFFIXES "lib/.libs" "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}"
|
||||
@ -50,15 +50,20 @@ include (FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(ZOLTAN
|
||||
DEFAULT_MSG
|
||||
ZOLTAN_LIBRARIES
|
||||
ZOLTAN_INCLUDE_DIRS
|
||||
ZOLTAN_LIBRARY
|
||||
ZOLTAN_INCLUDE_DIR
|
||||
MPI_FOUND
|
||||
)
|
||||
|
||||
if (ZOLTAN_FOUND)
|
||||
set(HAVE_ZOLTAN 1)
|
||||
set(ZOLTAN_LIBRARIES ${ZOLTAN_LIBRARIES} ${PARMETIS_LIBRARIES} ${PTSCOTCH_LIBRARIES})
|
||||
set(ZOLTAN_INCLUDE_DIRS ${ZOLTAN_INCLUDE_DIRS} ${PARMETIS_INCLUDE_DIRS}
|
||||
set(ZOLTAN_LIBRARIES ${ZOLTAN_LIBRARY} ${PARMETIS_LIBRARIES} ${PTSCOTCH_LIBRARIES})
|
||||
set(ZOLTAN_INCLUDE_DIRS ${ZOLTAN_INCLUDE_DIR} ${PARMETIS_INCLUDE_DIRS}
|
||||
${PTSCOTCH_INCLUDE_DIRS})
|
||||
# log result
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determing location of ZOLTAN succeeded:\n"
|
||||
" Include directory: ${ZOLTAN_INCLUDE_DIRS}\n"
|
||||
" Library directory: ${ZOLTAN_LIBRARIES}\n\n")
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user