Skip to content
Snippets Groups Projects
Commit 63b45836 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Fix dataman and bzip2 dependencies

parent 9aa408da
No related branches found
No related tags found
1 merge request!9Fix dependencies
#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0. See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#
# FindDataMan
# ---------
#
# Try to find the DataMan library from Jason Wang, ORNL
# https://github.com/JasonRuonanWang/DataMan
#
# This module defines the following variables:
#
# DataMan_FOUND - System has DataMan
# DataMan_INCLUDE_DIRS - The DataMan include directory
# DataMan_LIBRARIES - Link these to use DataMan
#
# and the following imported targets:
# DataMan::DataMan - The core DataMan library
#
# You can also set the following variable to help guide the search:
# DataMan_ROOT_DIR - The install prefix for DataMan containing the
# include and lib folders
if(NOT DataMan_FOUND)
# Search for the core libraries
if(DataMan_ROOT_DIR)
# If a root directory is specified, then don't look anywhere else
find_path(DataMan_INCLUDE_DIR DataMan.h
HINTS ${DataMan_ROOT_DIR}/include
NO_DEFAULT_PATHS
)
set(_DataMan_LIBRARY_HINT HINTS ${DataMan_ROOT_DIR}/lib NO_DEFAULT_PATHS)
else()
# Otherwise use the include dir as a basis to search for the lib
find_path(DataMan_INCLUDE_DIR DataMan.h)
if(DataMan_INCLUDE_DIR)
get_filename_component(_DataMan_PREFIX "${DataMan_INCLUDE_DIR}" PATH)
set(_DataMan_LIBRARY_HINT HINTS ${_DataMan_PREFIX}/lib)
unset(_DataMan_PREFIX)
endif()
endif()
find_library(DataMan_LIBRARY dataman ${_DataMan_LIBRARY_HINT})
unset(_DataMan_LIBRARY_HINT)
find_package_handle_standard_args(DataMan
FOUND_VAR DataMan_FOUND
REQUIRED_VARS
DataMan_INCLUDE_DIR
DataMan_LIBRARY
)
if(DataMan_FOUND)
set(DataMan_INCLUDE_DIRS ${DataMan_INCLUDE_DIR})
set(DataMan_LIBRARIES ${DataMan_LIBRARY})
if(DataMan_FOUND AND NOT TARGET DataMan::DataMan)
add_library(DataMan::DataMan UNKNOWN IMPORTED)
set_target_properties(DataMan::DataMan PROPERTIES
IMPORTED_LOCATION "${DataMan_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${DataMan_INCLUDE_DIR}"
)
endif()
endif()
endif()
......@@ -6,5 +6,6 @@ if(ADIOS_USE_ADIOS1)
endif()
if(ADIOS_USE_DataMan)
add_subdirectory(dataman)
add_subdirectory(datamanReader)
add_subdirectory(datamanWriter)
endif()
add_executable(hello_datamanReader helloDataManReader.cpp)
target_link_libraries(hello_datamanReader adios2)
add_executable(hello_datamanReader_nompi helloDataManReader_nompi.cpp)
target_link_libraries(hello_datamanReader_nompi adios2)
add_executable(hello_datamanWriter helloDataManWriter.cpp)
target_link_libraries(hello_datamanWriter adios2)
add_executable(hello_datamanWriter_nompi helloDataManWriter_nompi.cpp)
target_link_libraries(hello_datamanWriter_nompi adios2)
add_library(adios2
ADIOS.cpp
#ADIOS_C.cpp
capsule/heap/STLVector.cpp
capsule/shmem/ShmSystemV.cpp
core/Capsule.cpp
core/Engine.cpp
core/Method.cpp
core/Support.cpp
core/Transform.cpp
core/Transport.cpp
engine/bp/BPFileReader.cpp
engine/bp/BPFileWriter.cpp
format/BP1.cpp
format/BP1Aggregator.cpp
format/BP1Writer.cpp
functions/adiosFunctions.cpp
transport/file/FStream.cpp
transport/file/FileDescriptor.cpp
transport/file/FilePointer.cpp
)
target_include_directories(adios2 PUBLIC ${ADIOS_SOURCE_DIR}/include)
......@@ -9,14 +32,31 @@ if(ADIOS_USE_MPI)
target_include_directories(adios2 PUBLIC ${MPI_C_INCLUDE_PATH})
target_link_libraries(adios2 PUBLIC ${MPI_C_LIBRARIES})
else()
target_sources(adios2 mpidummy.cpp)
target_sources(adios2 PRIVATE mpidummy.cpp)
target_compile_definitions(adios2 PUBLIC ADIOS_NOMPI)
endif()
add_subdirectory(capsule)
add_subdirectory(core)
add_subdirectory(engine)
add_subdirectory(format)
add_subdirectory(functions)
add_subdirectory(transport)
add_subdirectory(transform)
if(ADIOS_USE_ADIOS1)
find_package(ADIOS REQUIRED)
target_sources(adios2 PRIVATE
engine/adios1/ADIOS1Reader.cpp
engine/adios1/ADIOS1Writer.cpp
)
target_link_libraries(adios2 PRIVATE adios::adios)
endif()
if(ADIOS_USE_DataMan)
find_package(DataMan REQUIRED)
target_sources(adios2 PRIVATE
engine/dataman/DataManReader.cpp
engine/dataman/DataManWriter.cpp
transport/wan/MdtmMan.cpp
)
target_link_libraries(adios2 PRIVATE DataMan::DataMan)
endif()
if(ADIOS_USE_BZip2)
find_package(BZip2 REQUIRED)
target_sources(adios2 PRIVATE transform/BZip2.cpp)
target_link_libraries(adios2 PRIVATE BZip2::BZip2)
endif()
target_sources(adios2 PRIVATE
capsule/heap/STLVector.cpp
capsule/shmem/ShmSystemV.cpp
)
target_sources(adios2 PRIVATE
core/Capsule.cpp
core/Engine.cpp
core/Method.cpp
core/Support.cpp
core/Transform.cpp
core/Transport.cpp
)
target_sources(adios2 PRIVATE
engine/bp/BPFileReader.cpp
engine/bp/BPFileWriter.cpp
)
if(ADIOS_USE_ADIOS1)
find_package(ADIOS REQUIRED)
target_sources(adios2 PRIVATE
adios1/ADIOS1Reader.cpp
adios1/ADIOS1Writer.cpp
)
target_link_libraries(adios2 adios::adios)
endif()
if(ADIOS_USE_DataMan)
find_pacakge(DataMan REQUIRED)
target_sources(adios2 PRIVATE
dataman/DataManReader.cpp
dataman/DataManWriter.cpp
)
target_link_libraries(adios2 PRIVATE DataMan::DataMan)
endif()
target_sources(adios2 PRIVATE
format/BP1.cpp
format/BP1Aggregator.cpp
format/BP1Writer.cpp
)
target_sources(adios2 PRIVATE
functions/adiosFunctions.cpp
)
if(ADIOS_USE_BZIP2)
find_package(BZip REQUIRED)
target_sources(adios2 BZip2.cpp)
target_link_libraries(adios2 PRIVATE BZip2::BZip2)
endif()
target_sources(adios2 PRIVATE
transport/file/FStream.cpp
transport/file/FileDescriptor.cpp
transport/file/FilePointer.cpp
)
if(ADIOS_USE_DataMan)
find_pacakge(DataMan REQUIRED)
target_sources(adios2 PRIVATE
wan/MdtmMan.cpp
)
target_link_libraries(adios2 PRIVATE DataMan::DataMan)
endif()
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