diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/pagmo2 | |
Diffstat (limited to 'vcpkg/ports/pagmo2')
| -rw-r--r-- | vcpkg/ports/pagmo2/disable-werror.patch | 20 | ||||
| -rw-r--r-- | vcpkg/ports/pagmo2/doxygen.patch | 15 | ||||
| -rw-r--r-- | vcpkg/ports/pagmo2/find-tbb.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/pagmo2/portfile.cmake | 38 | ||||
| -rw-r--r-- | vcpkg/ports/pagmo2/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/pagmo2/vcpkg.json | 32 |
6 files changed, 122 insertions, 0 deletions
diff --git a/vcpkg/ports/pagmo2/disable-werror.patch b/vcpkg/ports/pagmo2/disable-werror.patch new file mode 100644 index 0000000..bc5ba11 --- /dev/null +++ b/vcpkg/ports/pagmo2/disable-werror.patch @@ -0,0 +1,20 @@ +diff --git a/cmake_modules/yacma/YACMACompilerLinkerSettings.cmake b/cmake_modules/yacma/YACMACompilerLinkerSettings.cmake +index 7d7aa1b..81c8bf6 100644 +--- a/cmake_modules/yacma/YACMACompilerLinkerSettings.cmake ++++ b/cmake_modules/yacma/YACMACompilerLinkerSettings.cmake +@@ -95,7 +95,6 @@ if(NOT _YACMACompilerLinkerSettingsRun) + # NOTE: enable unconditionally, as it seems like the CMake + # machinery for detecting this fails. Perhaps the source code + # used for checking the flag emits warnings? +- list(APPEND _YACMA_CXX_FLAGS_DEBUG "-Werror") + # New warnings in clang 8. + # NOTE: a few issues with macros here, let's disable for now. + # _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra-semi-stmt) +@@ -180,7 +179,6 @@ if(NOT _YACMACompilerLinkerSettingsRun) + # Enable higher warning level than usual. + _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4) + # Treat warnings as errors. +- _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX) + endif() + + # Set the cache variables. diff --git a/vcpkg/ports/pagmo2/doxygen.patch b/vcpkg/ports/pagmo2/doxygen.patch new file mode 100644 index 0000000..1a59a91 --- /dev/null +++ b/vcpkg/ports/pagmo2/doxygen.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 34bad69..dfb942d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -398,8 +398,8 @@ endif()
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.hpp.in" "${CMAKE_CURRENT_BINARY_DIR}/include/pagmo/config.hpp" @ONLY)
+
+ # Configure the doc files.
+-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen/Doxyfile.in" "${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen/Doxyfile" @ONLY)
+-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/sphinx/conf.py.in" "${CMAKE_CURRENT_SOURCE_DIR}/doc/sphinx/conf.py" @ONLY)
++# configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen/Doxyfile.in" "${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen/Doxyfile" @ONLY)
++# configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/sphinx/conf.py.in" "${CMAKE_CURRENT_SOURCE_DIR}/doc/sphinx/conf.py" @ONLY)
+
+ # This is just a simple counter variable, internal use only.
+ set(_PAGMO_TEST_NUM "0")
diff --git a/vcpkg/ports/pagmo2/find-tbb.patch b/vcpkg/ports/pagmo2/find-tbb.patch new file mode 100644 index 0000000..56d998e --- /dev/null +++ b/vcpkg/ports/pagmo2/find-tbb.patch @@ -0,0 +1,13 @@ +diff --git a/pagmo-config.cmake.in b/pagmo-config.cmake.in +index 9553fc8..cb5e90b 100644 +--- a/pagmo-config.cmake.in ++++ b/pagmo-config.cmake.in +@@ -8,6 +8,8 @@ set(THREADS_PREFER_PTHREAD_FLAG YES) + find_package(Threads REQUIRED) + unset(THREADS_PREFER_PTHREAD_FLAG) + include(PagmoFindBoost) ++include(CMakeFindDependencyMacro) ++find_dependency(TBB CONFIG) + @_PAGMO_CONFIG_OPTIONAL_DEPS@ + # Restore original module path. + set(CMAKE_MODULE_PATH "${_PAGMO_CONFIG_OLD_MODULE_PATH}") diff --git a/vcpkg/ports/pagmo2/portfile.cmake b/vcpkg/ports/pagmo2/portfile.cmake new file mode 100644 index 0000000..995d9dc --- /dev/null +++ b/vcpkg/ports/pagmo2/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO esa/pagmo2 + REF "v${VERSION}" + SHA512 9ebe7f63b907607ea5762e56a884be62630efaca3f45d9ba9ad85ca1818d60d09864422bd075c2653aea1a14609fe9ad6520297aee5a00e07fa88df45872cef9 + HEAD_REF master + PATCHES + doxygen.patch + find-tbb.patch + disable-werror.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + nlopt PAGMO_WITH_NLOPT +) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PAGMO_BUILD_STATIC_LIBRARY) +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DPAGMO_BUILD_TESTS=OFF + -DPAGMO_BUILD_BENCHMARKS=OFF + -DPAGMO_BUILD_TUTORIALS=OFF + -DPAGMO_WITH_EIGEN3=ON + -DPAGMO_BUILD_STATIC_LIBRARY=${PAGMO_BUILD_STATIC_LIBRARY} +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/pagmo") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.lgpl3" "${SOURCE_PATH}/COPYING.gpl3") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/vcpkg/ports/pagmo2/usage b/vcpkg/ports/pagmo2/usage new file mode 100644 index 0000000..f9b3e06 --- /dev/null +++ b/vcpkg/ports/pagmo2/usage @@ -0,0 +1,4 @@ +pagmo2 provides CMake targets: + + find_package(pagmo CONFIG REQUIRED) + target_link_libraries(main PRIVATE Pagmo::pagmo) diff --git a/vcpkg/ports/pagmo2/vcpkg.json b/vcpkg/ports/pagmo2/vcpkg.json new file mode 100644 index 0000000..54e644a --- /dev/null +++ b/vcpkg/ports/pagmo2/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "pagmo2", + "version": "2.19.1", + "description": "A C++ platform to perform parallel computations of optimization tasks (global and local) via the asynchronous generalized island model.", + "homepage": "https://esa.github.io/pagmo2/", + "license": "GPL-3.0-or-later OR LGPL-3.0-or-later", + "supports": "!xbox", + "dependencies": [ + "boost-any", + "boost-graph", + "boost-safe-numerics", + "boost-serialization", + "eigen3", + "tbb", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "nlopt": { + "description": "Enable the NLopt wrappers", + "dependencies": [ + "nlopt" + ] + } + } +} |