From 2d0bfea99b1113c890833c86c367066fdb3d2090 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Wed, 8 Feb 2023 00:56:48 +0100 Subject: [PATCH] [adios2] add port (#29264) * [adios2] add port * v db * remove one of the executable * add usage fix tools. * v db * fix static builds * v db * cr comments * v db --- ports/adios2/portfile.cmake | 62 +++++++++++++++++++++++++++++++++++++ ports/adios2/usage | 4 +++ ports/adios2/vcpkg.json | 59 +++++++++++++++++++++++++++++++++++ versions/a-/adios2.json | 9 ++++++ versions/baseline.json | 4 +++ 5 files changed, 138 insertions(+) create mode 100644 ports/adios2/portfile.cmake create mode 100644 ports/adios2/usage create mode 100644 ports/adios2/vcpkg.json create mode 100644 versions/a-/adios2.json diff --git a/ports/adios2/portfile.cmake b/ports/adios2/portfile.cmake new file mode 100644 index 0000000000..71f6fe1443 --- /dev/null +++ b/ports/adios2/portfile.cmake @@ -0,0 +1,62 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ornladios/ADIOS2 + REF 473fe8c7d1a13c0746910361aa45ee1b96f57bfb + SHA512 ef8af30419cf57183b52ce9cb29613a381b06e16848a6d22d83c751c43b8485e504be90cead1381adcc92bb8d4912611083cd6d0b73d161b33f779231a041e6c + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + mpi ADIOS2_USE_MPI + cuda ADIOS2_USE_CUDA + python ADIOS2_USE_Python # requires numpy / mpi4py; so not exposed in the manifest yet +) + +set(disabled_options "") +list(APPEND disabled_options ZFP SZ LIBPRESSIO MGARD DAOS DataMan DataSpaces MHS SST BP5 IME Fortran SysVShMem Profiling) +list(TRANSFORM disabled_options PREPEND "-DADIOS2_USE_") +list(TRANSFORM disabled_options APPEND ":BOOL=OFF") +set(enabled_options "") +list(APPEND enabled_options BZip2 Blosc PNG ZeroMQ HDF5 Endian_Reverse Sodium) +list(TRANSFORM enabled_options PREPEND "-DADIOS2_USE_") +list(TRANSFORM enabled_options APPEND ":BOOL=OFF") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + ${disabled_options} + ${enabled_options} + -DBUILD_TESTING=OFF + -DADIOS2_BUILD_EXAMPLES=OFF + -DADIOS2_INSTALL_GENERATE_CONFIG=OFF + MAYBE_UNUSED_VARIABLES + ADIOS2_USE_DAOS + ADIOS2_USE_DataMan + ADIOS2_USE_DataSpaces + ADIOS2_USE_SysVShMem +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") + +set(tools "adios2_reorganize" "bpls") +if(ADIOS2_USE_MPI) + list(APPEND tools "adios2_reorganize_mpi" "adios2_iotest") +endif() + +vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN) +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/adios2_deactivate_bp" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/adios2_deactivate_bp") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/adios2/toolkit/sst/dp" "${CURRENT_PACKAGES_DIR}/include/adios2/toolkit/sst/util") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/adios2/usage b/ports/adios2/usage new file mode 100644 index 0000000000..eb6142ab3b --- /dev/null +++ b/ports/adios2/usage @@ -0,0 +1,4 @@ +The package adios2 provides CMake targets: + + find_package(adios2 CONFIG REQUIRED) + target_link_libraries(main PRIVATE adios2::adios2) diff --git a/ports/adios2/vcpkg.json b/ports/adios2/vcpkg.json new file mode 100644 index 0000000000..47163a1a8c --- /dev/null +++ b/ports/adios2/vcpkg.json @@ -0,0 +1,59 @@ +{ + "name": "adios2", + "version": "2.8.3", + "description": "Next generation of ADIOS developed in the Exascale Computing Program", + "homepage": "https://github.com/ornladios/ADIOS2", + "license": "Apache-2.0", + "dependencies": [ + "blosc", + "bzip2", + { + "name": "hdf5", + "default-features": false + }, + "libffi", + "libpng", + "libsodium", + "pugixml", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zeromq" + ], + "features": { + "cuda": { + "description": "Enable CUDA support", + "dependencies": [ + "cuda" + ] + }, + "mpi": { + "description": "Enable MPI support", + "dependencies": [ + { + "name": "hdf5", + "default-features": false, + "features": [ + "parallel" + ] + }, + "mpi" + ] + }, + "python": { + "description": "Enable Python bindings", + "dependencies": [ + "python3", + { + "name": "python3", + "host": true + } + ] + } + } +} diff --git a/versions/a-/adios2.json b/versions/a-/adios2.json new file mode 100644 index 0000000000..524dc34b08 --- /dev/null +++ b/versions/a-/adios2.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "1a832feea61b7166bf688a246cda2f7c038aeeac", + "version": "2.8.3", + "port-version": 0 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 18fe1824bf..800e0d00d2 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -40,6 +40,10 @@ "baseline": "0.1.1f", "port-version": 2 }, + "adios2": { + "baseline": "2.8.3", + "port-version": 0 + }, "advobfuscator": { "baseline": "2020-06-26", "port-version": 0