aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/hpx
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/hpx')
-rw-r--r--vcpkg/ports/hpx/portfile.cmake99
-rw-r--r--vcpkg/ports/hpx/usage4
-rw-r--r--vcpkg/ports/hpx/vcpkg.json84
3 files changed, 187 insertions, 0 deletions
diff --git a/vcpkg/ports/hpx/portfile.cmake b/vcpkg/ports/hpx/portfile.cmake
new file mode 100644
index 0000000..bffa0ef
--- /dev/null
+++ b/vcpkg/ports/hpx/portfile.cmake
@@ -0,0 +1,99 @@
+if(VCPKG_TARGET_IS_WINDOWS)
+ vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
+endif()
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" HPX_WITH_STATIC_LINKING)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO STEllAR-GROUP/hpx
+ REF "v${VERSION}"
+ SHA512 bf22add7a97087f68bd49fe0ae5b2bfbd7ba01d4018872c3934ebd81a632e2559e6144c5aa06779db971c642d5a41b16c8c48108af2c4069be6d9f9b72985182
+ HEAD_REF master
+)
+
+vcpkg_check_features(
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ "zlib" HPX_WITH_COMPRESSION_ZLIB
+ "snappy" HPX_WITH_COMPRESSION_SNAPPY
+ "bzip2" HPX_WITH_COMPRESSION_BZIP2
+ "cuda" HPX_WITH_CUDA
+ "mpi" HPX_WITH_PARCELPORT_MPI
+ "mpi" HPX_WITH_PARCELPORT_MPI_MULTITHREADED
+)
+
+if(NOT VCPKG_TARGET_ARCHITECTURE MATCHES "(x64|x86)")
+ list(APPEND FEATURE_OPTIONS "-DHPX_WITH_GENERIC_CONTEXT_COROUTINES=ON")
+endif()
+
+file(REMOVE "${SOURCE_PATH}/cmake/FindBZip2.cmake") # Outdated
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DHPX_WITH_VCPKG=ON
+ -DHPX_WITH_TESTS=OFF
+ -DHPX_WITH_EXAMPLES=OFF
+ -DHPX_WITH_TOOLS=OFF
+ -DHPX_WITH_RUNTIME=OFF
+ -DHPX_USE_CMAKE_CXX_STANDARD=ON
+ ${FEATURE_OPTIONS}
+ -DHPX_WITH_PKGCONFIG=OFF
+ -DHPX_WITH_STATIC_LINKING=${HPX_WITH_STATIC_LINKING}
+ -DHPX_WITH_PARCELPORT_TCP=ON
+ -DHPX_WITH_THREAD_TARGET_ADDRESS=ON
+ -DHPX_WITH_CHECK_MODULE_DEPENDENCIES=ON
+ -DHPX_WITH_THREAD_IDLE_RATES=ON
+ -DVCPKG_HOST_TRIPLET=${_HOST_TRIPLET}
+)
+vcpkg_cmake_install()
+
+# post build cleanup
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/HPX)
+
+file(GLOB_RECURSE CMAKE_FILES "${CURRENT_PACKAGES_DIR}/share/hpx/*.cmake")
+foreach(CMAKE_FILE IN LISTS CMAKE_FILES)
+ file(READ ${CMAKE_FILE} _contents)
+ string(REGEX REPLACE
+ "lib/([A-Za-z0-9_.-]+\\.dll)"
+ "bin/\\1"
+ _contents "${_contents}")
+ string(REGEX REPLACE
+ "lib/hpx/([A-Za-z0-9_.-]+\\.dll)"
+ "bin/hpx/\\1"
+ _contents "${_contents}")
+ file(WRITE ${CMAKE_FILE} "${_contents}")
+endforeach()
+
+vcpkg_replace_string(
+ "${CURRENT_PACKAGES_DIR}/share/${PORT}/HPXConfig.cmake"
+ "set(HPX_BUILD_TYPE \"Release\")"
+ "set(HPX_BUILD_TYPE \"\${CMAKE_BUILD_TYPE}\")")
+
+vcpkg_replace_string(
+ "${CURRENT_PACKAGES_DIR}/share/${PORT}/HPXMacros.cmake"
+ "set(CMAKE_MODULE_PATH \${CMAKE_MODULE_PATH}"
+ "list(APPEND CMAKE_MODULE_PATH")
+
+file(INSTALL
+ "${SOURCE_PATH}/LICENSE_1_0.txt"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/hpxcxx" "${CURRENT_PACKAGES_DIR}/debug/bin/hpxcxx")
+
+if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/hpxrun.py")
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
+ file(RENAME "${CURRENT_PACKAGES_DIR}/bin/hpxrun.py" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/hpxrun.py")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/hpxrun.py" "'${CURRENT_INSTALLED_DIR}/tools/openmpi/bin/mpiexec'" "'mpiexec'" IGNORE_UNCHANGED)
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
+endif()
+
+configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
diff --git a/vcpkg/ports/hpx/usage b/vcpkg/ports/hpx/usage
new file mode 100644
index 0000000..cf471d0
--- /dev/null
+++ b/vcpkg/ports/hpx/usage
@@ -0,0 +1,4 @@
+The port hpx provides CMake targets:
+
+ find_package(HPX REQUIRED)
+ target_link_libraries(main PRIVATE HPX::hpx)
diff --git a/vcpkg/ports/hpx/vcpkg.json b/vcpkg/ports/hpx/vcpkg.json
new file mode 100644
index 0000000..84f17b6
--- /dev/null
+++ b/vcpkg/ports/hpx/vcpkg.json
@@ -0,0 +1,84 @@
+{
+ "name": "hpx",
+ "version": "1.11.0",
+ "description": [
+ "The C++ Standards Library for Concurrency and Parallelism",
+ "HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case."
+ ],
+ "homepage": "https://github.com/STEllAR-GROUP/hpx",
+ "license": "BSL-1.0",
+ "supports": "!(windows & arm64) & !(windows & staticcrt)",
+ "dependencies": [
+ "asio",
+ "boost-accumulators",
+ "boost-config",
+ "boost-context",
+ "boost-dynamic-bitset",
+ "boost-exception",
+ "boost-filesystem",
+ "boost-iostreams",
+ "boost-lockfree",
+ "boost-range",
+ "boost-spirit",
+ "boost-system",
+ "boost-throw-exception",
+ "boost-variant",
+ "boost-winapi",
+ {
+ "name": "gperftools",
+ "platform": "linux"
+ },
+ "hwloc",
+ {
+ "name": "pkgconf",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "default-features": [
+ "bzip2",
+ "mpi",
+ "snappy",
+ "zlib"
+ ],
+ "features": {
+ "bzip2": {
+ "description": "Build with bzip2 compression",
+ "dependencies": [
+ "bzip2"
+ ]
+ },
+ "cuda": {
+ "description": "Build with CUDA support",
+ "supports": "!linux & !(windows & arm)",
+ "dependencies": [
+ "cuda"
+ ]
+ },
+ "mpi": {
+ "description": "Build with MPI parcelport",
+ "dependencies": [
+ "mpi"
+ ]
+ },
+ "snappy": {
+ "description": "Build with snappy compression",
+ "dependencies": [
+ "snappy"
+ ]
+ },
+ "zlib": {
+ "description": "Build with zlib compression",
+ "dependencies": [
+ "zlib"
+ ]
+ }
+ }
+}