Skip to content

Commit 34eff46

Browse files
NancyLi1013grdowns
authored andcommitted
[libdivide] Add new port (#8320)
* [libdivide] Add new port * Update to v3.0
1 parent 628e795 commit 34eff46

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

ports/libdivide/CONTROL

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Source: libdivide
2+
Version: 3.0
3+
Homepage: https://github.com/ridiculousfish/libdivide
4+
Description: libdivide.h is a header-only C/C++ library for optimizing integer division.
5+
6+
Feature: test
7+
Description: Build test

ports/libdivide/portfile.cmake

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
vcpkg_from_github(
2+
OUT_SOURCE_PATH SOURCE_PATH
3+
REPO ridiculousfish/libdivide
4+
REF v3.0
5+
SHA512 fae17a4125c3b17aeb37283d7bba9fea2e4d3b208861d6ed81a6cdcf5dbf3286cf676cedba99c73a16115cf8bf9dcbd2cf6a48ca52fb85d4b0b24024e53d055e
6+
HEAD_REF master
7+
)
8+
9+
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
10+
test BUILD_TESTS
11+
)
12+
13+
vcpkg_configure_cmake(
14+
SOURCE_PATH ${SOURCE_PATH}
15+
PREFER_NINJA
16+
OPTIONS ${FEATURE_OPTIONS}
17+
-DLIBDIVIDE_SSE2=OFF
18+
-DLIBDIVIDE_AVX2=OFF
19+
-DLIBDIVIDE_AVX512=OFF
20+
-DENABLE_VECTOR_EXTENSIONS=OFF
21+
)
22+
23+
vcpkg_install_cmake()
24+
25+
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
26+
27+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
28+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
29+
30+
# Handle copyright
31+
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

0 commit comments

Comments
 (0)