Skip to content
Snippets Groups Projects
Commit c5332255 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon Committed by GitHub
Browse files

Merge pull request #81 from chuckatkins/add-zmq-and-zfp-depends

Add zmq and zfp depends
parents a9c3c3aa ea582110
No related branches found
No related tags found
No related merge requests found
......@@ -71,6 +71,7 @@ if(ADIOS_USE_MPI)
add_definitions(-DOMPI_SKIP_MPICXX)
endif()
option(ADIOS_USE_BZip2 "Enable support for BZip2 transforms" OFF)
option(ADIOS_USE_ZFP "Enable support for ZFP transforms" OFF)
option(ADIOS_USE_ADIOS1 "Enable support for the ADIOS 1 engine" OFF)
option(ADIOS_USE_HDF5 "Enable support for the HDF5 engine" OFF)
......@@ -79,7 +80,7 @@ option(ADIOS_USE_HDF5 "Enable support for the HDF5 engine" OFF)
set(ADIOS_USE_DataMan ${SHARED_LIBS_SUPPORTED})
include(GenerateADIOSConfig)
GenerateADIOSConfig(MPI BZip2 ADIOS1 HDF5 DataMan)
GenerateADIOSConfig(MPI ZFP BZip2 ADIOS1 HDF5 DataMan)
install(
FILES ${ADIOS_BINARY_DIR}/adios2/ADIOSConfig.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/adios2
......@@ -123,7 +124,7 @@ message("")
message("ADIOS2 build configuration:")
message(" ADIOS Version: ${ADIOS_VERSION}")
message(" C++ Compiler : ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} ${CMAKE_CXX_COMPILER_WRAPPER}")
message(" ${CMAKE_CXX_COMPILER}")
message(" ${CMAKE_CXX_COMPILER}")
message("")
message(" Installation prefix: ${CMAKE_INSTALL_PREFIX}")
message(" Features:")
......@@ -136,6 +137,7 @@ message(" Build Type: ${CMAKE_BUILD_TYPE}")
message(" Testing: ${BUILD_TESTING}")
message(" MPI: ${ADIOS_USE_MPI}")
message(" BZip2: ${ADIOS_USE_BZip2}")
message(" ZFP: ${ADIOS_USE_ZFP}")
message(" ADIOS1: ${ADIOS_USE_ADIOS1}")
message(" DataMan: ${ADIOS_USE_DataMan}")
message(" HDF5: ${ADIOS_USE_HDF5}")
......
#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0. See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#
#
# FindZFP
# -----------
#
# Try to find the zfp library
#
# This module defines the following variables:
#
# ZFP_FOUND - System has zfp
# ZFP_INCLUDE_DIRS - The zfp include directory
# ZFP_LIBRARIES - Link these to use zfp
#
# and the following imported targets:
# zfp::zfp - The zfp compression library target
#
# You can also set the following variable to help guide the search:
# ZFP_ROOT_DIR - The install prefix for zfp containing the
# include and lib folders
# Note: this can be set as a CMake variable or an
# environment variable. If specified as a CMake
# variable, it will override any setting specified
# as an environment variable.
if(NOT ZFP_FOUND)
if((NOT ZFP_ROOT_DIR) AND (NOT (ENV{ZFP_ROOT_DIR} STREQUAL "")))
set(ZFP_ROOT_DIR "$ENV{ZFP_ROOT_DIR}")
endif()
if(ZFP_ROOT_DIR)
set(ZFP_INCLUDE_OPTS HINTS ${ZFP_ROOT_DIR}/include NO_DEFAULT_PATHS)
set(ZFP_LIBRARY_OPTS
HINTS ${ZFP_ROOT_DIR}/lib ${ZFP_ROOT_DIR}/lib64
NO_DEFAULT_PATHS
)
endif()
find_path(ZFP_INCLUDE_DIR zfp.h ${ZFP_INCLUDE_OPTS})
find_library(ZFP_LIBRARY zfp ${ZFP_LIBRARY_OPTS})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ZFP
FOUND_VAR ZFP_FOUND
REQUIRED_VARS ZFP_LIBRARY ZFP_INCLUDE_DIR
)
if(ZFP_FOUND)
set(ZFP_INCLUDE_DIRS ${ZFP_INCLUDE_DIR})
set(ZFP_LIBRARIES ${ZFP_LIBRARY})
if(ZFP_FOUND AND NOT TARGET zfp::zfp)
add_library(zfp::zfp UNKNOWN IMPORTED)
set_target_properties(zfp::zfp PROPERTIES
IMPORTED_LOCATION "${ZFP_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${ZFP_INCLUDE_DIR}"
)
endif()
endif()
endif()
#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0. See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#
#
# FindZeroMQ
# -----------
#
# Try to find the ZeroMQ library
#
# This module defines the following variables:
#
# ZeroMQ_FOUND - System has ZMQ
# ZeroMQ_INCLUDE_DIRS - The ZMQ include directory
# ZeroMQ_LIBRARIES - Link these to use ZMQ
#
# and the following imported targets:
# ZeroMQ::ZMQ - The core ZMQ library
#
# You can also set the following variable to help guide the search:
# ZeroMQ_ROOT_DIR - The install prefix for ZeroMQ containing the
# include and lib folders
# Note: this can be set as a CMake variable or an
# environment variable. If specified as a CMake
# variable, it will override any setting specified
# as an environment variable.
if(NOT ZeroMQ_FOUND)
if((NOT ZeroMQ_ROOT_DIR) AND (NOT (ENV{ZeroMQ_ROOT_DIR} STREQUAL "")))
set(ZeroMQ_ROOT_DIR "$ENV{ZeroMQ_ROOT_DIR}")
endif()
if(ZeroMQ_ROOT_DIR)
set(ZeroMQ_INCLUDE_OPTS HINTS ${ZeroMQ_ROOT_DIR}/include NO_DEFAULT_PATHS)
set(ZeroMQ_LIBRARY_OPTS
HINTS ${ZeroMQ_ROOT_DIR}/lib ${ZeroMQ_ROOT_DIR}/lib64
NO_DEFAULT_PATHS
)
endif()
find_path(ZeroMQ_INCLUDE_DIR zmq.h ${ZeroMQ_INCLUDE_OPTS})
find_library(ZeroMQ_LIBRARY zmq ${ZeroMQ_LIBRARY_OPTS})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ZeroMQ
FOUND_VAR ZeroMQ_FOUND
REQUIRED_VARS ZeroMQ_LIBRARY ZeroMQ_INCLUDE_DIR
)
if(ZeroMQ_FOUND)
set(ZeroMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR})
set(ZeroMQ_LIBRARIES ${ZeroMQ_LIBRARY})
if(ZeroMQ_FOUND AND NOT TARGET ZeroMQ::ZMQ)
add_library(ZeroMQ::ZMQ UNKNOWN IMPORTED)
set_target_properties(ZeroMQ::ZMQ PROPERTIES
IMPORTED_LOCATION "${ZeroMQ_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${ZeroMQ_INCLUDE_DIR}"
)
endif()
endif()
endif()
......@@ -57,6 +57,13 @@ if(ADIOS_USE_BZip2)
target_link_libraries(adios2 PRIVATE BZip2::BZip2)
endif()
if(ADIOS_USE_ZFP)
find_package(ZFP REQUIRED)
message("ADIOS ZFP support not yet implemented")
# target_sources(adios2 PRIVATE transform/ZFP.cpp)
# target_link_libraries(adios2 PRIVATE zfp::zfp)
endif()
if(ADIOS_USE_MPI)
find_package(MPI COMPONENTS C REQUIRED)
target_include_directories(adios2 PUBLIC ${MPI_C_INCLUDE_PATH})
......
......@@ -21,6 +21,31 @@ add_library(cacheman MODULE CacheMan.h CacheMan.cpp)
target_link_libraries(cacheman PRIVATE dataman)
list(APPEND dataman_targets cacheman)
option(ADIOS_USE_DataMan_ZeroMQ "Enable ZeroMQ for DataMan" OFF)
if(ADIOS_USE_DataMan_ZeroMQ)
find_package(ZeroMQ REQUIRED)
message(STATUS "DataMan ZeroMQ support not yet implemented")
# add_library(zmqman MODULE ZmqMan.h ZmqMan.cpp)
# target_link_libraries(zmqman PRIVATE dataman ZeroMQ::ZMQ)
#
# list(APPEND dataman_targets zmqman)
endif()
# Make this a standalone option if you want to seperately enable/disable
# DataMan ZFP support from ADIOS ZFP support.
set(ADIOS_USE_DataMan_ZFP ${ADIOS_USE_ZFP})
if(ADIOS_USE_DataMan_ZFP)
find_package(ZFP REQUIRED)
message(STATUS "DataMan ZFP support not yet implemented")
# add_library(zfpman MODULE ZfpMan.h ZfpMan.cpp)
# target_link_libraries(zfpman PRIVATE dataman zfp::zfp)
#
# list(APPEND dataman_targets zfpman)
endif()
install(
TARGETS ${dataman_targets} EXPORT adios2
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment