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/libdivide | |
Diffstat (limited to 'vcpkg/ports/libdivide')
| -rw-r--r-- | vcpkg/ports/libdivide/no-werror.patch | 25 | ||||
| -rw-r--r-- | vcpkg/ports/libdivide/portfile.cmake | 34 | ||||
| -rw-r--r-- | vcpkg/ports/libdivide/vcpkg.json | 21 |
3 files changed, 80 insertions, 0 deletions
diff --git a/vcpkg/ports/libdivide/no-werror.patch b/vcpkg/ports/libdivide/no-werror.patch new file mode 100644 index 0000000..9d15381 --- /dev/null +++ b/vcpkg/ports/libdivide/no-werror.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 136400d..f54a722 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,15 +15,15 @@ include(CMakePushCheckState) + # Maximum warnings level & warnings as error + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC") # clang-cl +- add_compile_options("/W4;/WX;") ++ add_compile_options("/W4") + else() # clang native +- add_compile_options("-Wall;-Wextra;-pedantic;-Werror") ++ add_compile_options("-Wall;-Wextra;-pedantic") + endif() + else() + add_compile_options( +- "$<$<CXX_COMPILER_ID:MSVC>:/W4;/WX>" +- "$<$<CXX_COMPILER_ID:GNU>:-Wall;-Wextra;-pedantic;-Werror>" +- "$<$<CXX_COMPILER_ID:AppleClang>:-Wall;-Wextra;-pedantic;-Werror>" ++ "$<$<CXX_COMPILER_ID:MSVC>:/W4>" ++ "$<$<CXX_COMPILER_ID:GNU>:-Wall;-Wextra;-pedantic>" ++ "$<$<CXX_COMPILER_ID:AppleClang>:-Wall;-Wextra;-pedantic>" + ) + endif() + diff --git a/vcpkg/ports/libdivide/portfile.cmake b/vcpkg/ports/libdivide/portfile.cmake new file mode 100644 index 0000000..008a603 --- /dev/null +++ b/vcpkg/ports/libdivide/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ridiculousfish/libdivide + REF "v${VERSION}" + SHA512 1a429b436e545360fb898e059ce689f5123d3fce25242d5a54e52588b75c97008918c1dc5e43f537eb8b2e61577339955ca66d9bbb0eb4440a00500a8a146ccf + HEAD_REF master + PATCHES + no-werror.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test LIBDIVIDE_BUILD_TESTS +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DLIBDIVIDE_SSE2=OFF + -DLIBDIVIDE_AVX2=OFF + -DLIBDIVIDE_AVX512=OFF + -DLIBDIVIDE_NEON=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/libdivide/vcpkg.json b/vcpkg/ports/libdivide/vcpkg.json new file mode 100644 index 0000000..e5a0200 --- /dev/null +++ b/vcpkg/ports/libdivide/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "libdivide", + "version": "5.2.0", + "description": "libdivide.h is a header-only C/C++ library for optimizing integer division.", + "homepage": "https://github.com/ridiculousfish/libdivide", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "test": { + "description": "Build test" + } + } +} |