Commit d3e07e79 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

adios: port

parent c15a6ad0
Pipeline #23614 passed with stage
macro(adios_add_config_option adios_opt cmake_opt cmake_inc cmake_lib)
if(USE_SYSTEM_${cmake_opt})
get_filename_component(TMP_DIR1 "${${cmake_inc}}" DIRECTORY)
get_filename_component(TMP_DIR2 "${${cmake_lib}}" DIRECTORY)
get_filename_component(TMP_DIR2 "${TMP_DIR2}" DIRECTORY)
if(NOT (TMP_DIR1 STREQUAL TMP_DIR2))
message(WARNING "Mismatched base dirs for ${adios_opt}. Using ${TMP_DIR1}")
endif()
list(APPEND adios_ARGS "--with-${adios_opt}=${TMP_DIR1}")
else()
list(APPEND adios_ARGS "--with-${adios_opt}=<INSTALL_DIR>")
endif()
endmacro()
set(adios_DEPS)
set(adios_ARGS)
set(adios_ENV)
# ADIOS is *always* build statically so the best we can really do is make
# sure that it can be linked with shared libs
#if(BUILD_SHARED_LIBS)
# set(adios_ENV CFLAGS "-fPIC" CXXFLAGS "-fPIC")
#endif()
#
# But as it turns out, the superbuild already does this for us
#
adios_add_config_option(mxml mxml MXML_INCLUDE_DIR MXML_LIBRARY)
if(ENABLE_bzip2)
adios_add_config_option(bzip2 bzip2 BZIP2_INCLUDE_DIR BZIP2_LIBRARY)
list(APPEND adios_DEPS bzip2)
endif()
if(ENABLE_zlib)
adios_add_config_option(zlib zlib ZLIB_INCLUDE_DIR ZLIB_LIBRARY)
list(APPEND adios_DEPS zlib)
endif()
if(ENABLE_hdf5)
adios_add_config_option(hdf5 hdf5 HDF5_C_INCLUDE_DIR HDF5_hdf5_LIBRARY_RELEASE)
list(APPEND adios_DEPS hdf5)
endif()
if(ENABLE_netcdf)
adios_add_config_option(netcdf netcdf NETCDF_INCLUDE_DIR NETCDF_LIBRARY)
list(APPEND adios_DEPS netcdf)
endif()
add_external_project_or_use_system(adios
DEPENDS mpi mxml ${adios_DEPS}
BUILD_IN_SOURCE 1
PATCH_COMMAND <SOURCE_DIR>/autogen.sh
CONFIGURE_COMMAND <SOURCE_DIR>/configure
--prefix=<INSTALL_DIR>
--with-lustre
--disable-fortran
${adios_ARGS}
PROCESS_ENVIRONMENT
CC "${CMAKE_C_COMPILER}"
CXX "${CMAKE_CXX_COMPILER}"
MPICC "${MPI_C_COMPILER}"
MPICXX "${MPI_CXX_COMPILER}"
${adios_ENV}
)
add_extra_cmake_args(
-DADIOS_CONFIG:FILEPATH=<INSTALL_DIR>/bin/adios_config
)
function (adios_add_config_option adios_opt project include_dir library)
set(configure_option)
if (USE_SYSTEM_${project})
get_filename_component(include_root "${include_dir}" DIRECTORY)
get_filename_component(library_dir "${library}" DIRECTORY)
get_filename_component(library_root "${library_dir}" DIRECTORY)
if (NOT (include_root STREQUAL library_root))
message(WARNING "adios: Mismatched base dirs for ${adios_opt}; using \"${include_root}\".")
endif ()
set(configure_option "--with-${adios_opt}=${include_root}")
else ()
set(configure_option "--with-${adios_opt}=<INSTALL_DIR>")
endif ()
set("${adios_opt}_option"
${configure_option}
PARENT_SCOPE)
endfunction ()
set(adios_options)
adios_add_config_option(mxml mxml
"${MXML_INCLUDE_DIR}"
"${MXML_LIBRARY}")
list(APPEND adios_options ${mxml_option})
if (bzip2_enabled)
adios_add_config_option(bzip2 bzip2
"${BZIP2_INCLUDE_DIR}"
"${BZIP2_LIBRARY}")
list(APPEND adios_options ${bzip2_option})
endif ()
if (zlib_enabled)
adios_add_config_option(zlib zlib
"${ZLIB_INCLUDE_DIR}"
"${ZLIB_LIBRARY}")
list(APPEND adios_options ${zlib_option})
endif ()
if (hdf5_enabled)
adios_add_config_option(hdf5 hdf5
"${HDF5_C_INCLUDE_DIR}"
"${HDF5_hdf5_LIBRARY_RELEASE}")
list(APPEND adios_options ${hdf5_option})
endif ()
if (netcdf_enabled)
adios_add_config_option(netcdf netcdf
"${NETCDF_INCLUDE_DIR}"
"${NETCDF_LIBRARY}")
list(APPEND adios_options ${netcdf_option})
endif ()
superbuild_add_project(adios
CAN_USE_SYSTEM
DEPENDS mpi mxml
DEPENDS_OPTIONAL bzip2 zlib hdf5 netcdf
BUILD_IN_SOURCE 1
PATCH_COMMAND
<SOURCE_DIR>/autogen.sh
CONFIGURE_COMMAND
<SOURCE_DIR>/configure
--prefix=<INSTALL_DIR>
--with-lustre
--disable-fortran
${adios_ARGS}
PROCESS_ENVIRONMENT
CC "${CMAKE_C_COMPILER}"
CXX "${CMAKE_CXX_COMPILER}"
MPICC "${MPI_C_COMPILER}"
MPICXX "${MPI_CXX_COMPILER}")
superbuild_add_extra_cmake_args(
-DADIOS_CONFIG:FILEPATH=<INSTALL_DIR>/bin/adios_config)
find_program(ADIOS_CONFIG adios_config)
if(NOT ADIOS_CONFIG)
if (NOT ADIOS_CONFIG)
message(FATAL_ERROR "Unable to locate adios_config")
endif()
add_extra_cmake_args(
-DADIOS_CONFIG:FILEPATH=${ADIOS_CONFIG}
)
endif ()
superbuild_add_extra_cmake_args(
-DADIOS_CONFIG:FILEPATH=${ADIOS_CONFIG})
......@@ -22,6 +22,10 @@ superbuild_set_revision(diy
GIT_REPOSITORY "https://gitlab.kitware.com/paraview/diy.git"
GIT_TAG origin/for/paraview) # r178 + patch
superbuild_set_revision(adios
URL "http://www.paraview.org/files/dependencies/adios-1.8-439f0fb6.tar.bz2"
URL_MD5 a88701c77a7ead5daadd8d8aff70556a)
superbuild_set_revision(silo
URL "http://paraview.org/files/dependencies/silo-4.9.1-bsd.tar.gz"
URL_MD5 465d2a0a8958b088cde83fb2a5a7eeef)
......@@ -98,11 +102,6 @@ add_revision(mxml
URL_MD5 e21cad0f7aacd18f942aa0568a8dee19
)
add_revision(adios
URL http://www.paraview.org/files/dependencies/adios-1.8-439f0fb6.tar.bz2
URL_MD5 a88701c77a7ead5daadd8d8aff70556a
)
set(ispc_file "")
set(ispc_md5 "")
if (WIN32)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment