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

Finished header migration and added install rules

parent 0be9007e
No related branches found
No related tags found
1 merge request!69More header shuffling
Showing
with 49 additions and 13 deletions
......@@ -92,13 +92,6 @@ add_subdirectory(thirdparty)
#------------------------------------------------------------------------------#
add_subdirectory(source)
#------------------------------------------------------------------------------#
# Installation
#------------------------------------------------------------------------------#
install(DIRECTORY include/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
)
#------------------------------------------------------------------------------#
# Examples
#------------------------------------------------------------------------------#
......
File moved
File moved
File moved
File moved
File moved
......@@ -5,7 +5,6 @@
add_library(adios2
ADIOS.cpp ADIOS.tcc
#ADIOS_C.cpp
capsule/heap/STLVector.cpp
capsule/shmem/ShmSystemV.cpp
......@@ -36,7 +35,9 @@ add_library(adios2
utilities/format/bp1/BP1Writer.tcc
)
target_include_directories(adios2
PUBLIC ${ADIOS_SOURCE_DIR}/include
PUBLIC
$<BUILD_INTERFACE:${ADIOS_BINARY_DIR}>
$<INSTALL_INTERFACE:include>
PRIVATE ${ADIOS_SOURCE_DIR}/source
)
......@@ -51,7 +52,6 @@ if(ADIOS_USE_DataMan)
target_compile_definitions(adios2 PRIVATE ADIOS_HAVE_DATAMAN)
target_link_libraries(adios2 PRIVATE ${CMAKE_DL_LIBS})
endif()
if(ADIOS_USE_BZip2)
find_package(BZip2 REQUIRED)
......@@ -60,7 +60,6 @@ if(ADIOS_USE_BZip2)
target_link_libraries(adios2 PRIVATE BZip2::BZip2)
endif()
if(ADIOS_USE_MPI)
find_package(MPI COMPONENTS C REQUIRED)
target_include_directories(adios2 PUBLIC ${MPI_C_INCLUDE_PATH})
......@@ -88,9 +87,15 @@ endif()
if(ADIOS_USE_HDF5)
find_package(HDF5 REQUIRED)
if(ADIOS_USE_MPI AND (NOT HDF5_IS_PARALLEL))
message(FATAL_ERROR "A sequential version of HDF5 was detected but the parallel version of ADIOS is being built, which requires a parallel HDF5.")
message(FATAL_ERROR
"A sequential version of HDF5 was detected but the parallel version "
"of ADIOS is being built, which requires a parallel HDF5."
)
elseif((NOT ADIOS_USE_MPI) AND HDF5_IS_PARALLEL)
message(FATAL_ERROR "A parallel version of HDF5 was detected but the sequential version of ADIOS is being built, which requires a sequential HDF5.")
message(FATAL_ERROR
"A parallel version of HDF5 was detected but the sequential version "
"of ADIOS is being built, which requires a sequential HDF5."
)
endif()
target_include_directories(adios2 PRIVATE ${HDF5_INCLUDE_DIRS})
......@@ -101,3 +106,26 @@ if(ADIOS_USE_HDF5)
target_compile_definitions(adios2 PRIVATE ADIOS_HAVE_HDF5)
target_link_libraries(adios2 PRIVATE ${HDF5_C_LIBRARIES})
endif()
# Main header when using the build directory
set(ADIOS_INCLUDE_DIR "${ADIOS_SOURCE_DIR}/source")
configure_file(adios2.h.in ${ADIOS_BINARY_DIR}/adios2.h)
# Header installation
set(ADIOS_INCLUDE_DIR "adios2")
configure_file(adios2.h.in ${ADIOS_BINARY_DIR}/adios2.install.h)
install(
FILES ${ADIOS_BINARY_DIR}/adios2.install.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
RENAME adios2.h
)
install(
FILES
ADIOS.h ADIOSMacros.h ADIOS_MPI.h ADIOSTypes.h mpidummy.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/adios2
)
install(
DIRECTORY core
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/adios2
FILES_MATCHING PATTERN "*.h" PATTERN "*.inl"
)
/*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* ADIOS_CPP.h
*
* Created on: Jan 9, 2017
* Author: wfg
*/
#ifndef ADIOS_CPP_H_
#define ADIOS_CPP_H_
#ifndef ADIOS2_H_
#define ADIOS2_H_
#include "ADIOS.h"
#include "ADIOSTypes.h"
#include "core/Method.h"
#include "@ADIOS_INCLUDE_DIR@/ADIOS.h"
#include "@ADIOS_INCLUDE_DIR@/ADIOSTypes.h"
#include "@ADIOS_INCLUDE_DIR@/core/Method.h"
#include "@ADIOS_INCLUDE_DIR@/core/Engine.h"
#include "@ADIOS_INCLUDE_DIR@/core/Transform.h"
#include "core/Engine.h"
#include "core/Transform.h"
#endif /* ADIOS_CPP_H_ */
#endif /* ADIOS2_H_ */
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
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