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

Merge pull request #9 from chuckatkins/fix-dependencies

Fix dependencies
parents 9aa408da fac20440
No related branches found
No related tags found
No related merge requests found
...@@ -97,3 +97,24 @@ if(BUILD_TESTING) ...@@ -97,3 +97,24 @@ if(BUILD_TESTING)
enable_testing() enable_testing()
add_subdirectory(testing) add_subdirectory(testing)
endif() endif()
#------------------------------------------------------------------------------#
# Configuration summary
#------------------------------------------------------------------------------#
message("")
message("ADIOS2 build configuration:")
message(" C++ Compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} ${CMAKE_CXX_COMPILER_WRAPPER}")
message(" ${CMAKE_CXX_COMPILER}")
message("")
message(" Installation prefix: ${CMAKE_INSTALL_PREFIX}")
message(" Features:")
if(BUILD_SHARED_LIBS)
message(" Type: shared")
else()
message(" Type: static")
endif()
message(" MPI: ${ADIOS_USE_MPI}")
message(" BZip2: ${ADIOS_USE_BZip2}")
message(" ADIOS1: ${ADIOS_USE_ADIOS1}")
message(" DataMan: ${ADIOS_USE_DataMan}")
message("")
#------------------------------------------------------------------------------#
# 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) ...@@ -6,5 +6,6 @@ if(ADIOS_USE_ADIOS1)
endif() endif()
if(ADIOS_USE_DataMan) if(ADIOS_USE_DataMan)
add_subdirectory(dataman) add_subdirectory(datamanReader)
add_subdirectory(datamanWriter)
endif() 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)
...@@ -16,7 +16,7 @@ cd ${SOURCE_DIR} ...@@ -16,7 +16,7 @@ cd ${SOURCE_DIR}
# Check C and C++ code with clang-format # Check C and C++ code with clang-format
echo "Checking formatting for commit range: ${COMMIT_RANGE}" echo "Checking formatting for commit range: ${COMMIT_RANGE}"
DIFF="$(./scripts/developer/git/git-clang-format --diff ${COMMIT_RANGE})" DIFF="$(./scripts/developer/git/git-clang-format --diff ${COMMIT_RANGE})"
if [ -n "${DIFF}" ] if [ -n "${DIFF}" ] && [ "${DIFF}" != "no modified files to format" ]
then then
echo "clang-format:" echo "clang-format:"
echo " Code format checks failed." echo " Code format checks failed."
......
add_library(adios2 add_library(adios2
ADIOS.cpp ADIOS.cpp
#ADIOS_C.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) target_include_directories(adios2 PUBLIC ${ADIOS_SOURCE_DIR}/include)
...@@ -9,14 +32,31 @@ if(ADIOS_USE_MPI) ...@@ -9,14 +32,31 @@ if(ADIOS_USE_MPI)
target_include_directories(adios2 PUBLIC ${MPI_C_INCLUDE_PATH}) target_include_directories(adios2 PUBLIC ${MPI_C_INCLUDE_PATH})
target_link_libraries(adios2 PUBLIC ${MPI_C_LIBRARIES}) target_link_libraries(adios2 PUBLIC ${MPI_C_LIBRARIES})
else() else()
target_sources(adios2 mpidummy.cpp) target_sources(adios2 PRIVATE mpidummy.cpp)
target_compile_definitions(adios2 PUBLIC ADIOS_NOMPI) target_compile_definitions(adios2 PUBLIC ADIOS_NOMPI)
endif() endif()
add_subdirectory(capsule) if(ADIOS_USE_ADIOS1)
add_subdirectory(core) find_package(ADIOS REQUIRED)
add_subdirectory(engine) target_sources(adios2 PRIVATE
add_subdirectory(format) engine/adios1/ADIOS1Reader.cpp
add_subdirectory(functions) engine/adios1/ADIOS1Writer.cpp
add_subdirectory(transport) )
add_subdirectory(transform) 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