Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[geogram] Add arm64-windows support #26875

Merged
merged 3 commits into from
Oct 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ports/geogram/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ vcpkg_from_github(
SHA512 0ec0deded92c8d5d100b6e77f8cfbbbaf7b744c230e10abd0b86861960cda9713ff65209575fdc09034afcb0e9137428a20c00d399c09fd58ce541fed2105a2d
PATCHES
fix-vcpkg-install.patch
use-arm64-intrinsics.patch
)

file(COPY ${CURRENT_PORT_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/cmake)
Expand Down
16 changes: 16 additions & 0 deletions ports/geogram/use-arm64-intrinsics.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/src/lib/geogram/delaunay/periodic_delaunay_3d.cpp b/src/lib/geogram/delaunay/periodic_delaunay_3d.cpp
index 352ea76..34e73e2 100644
--- a/src/lib/geogram/delaunay/periodic_delaunay_3d.cpp
+++ b/src/lib/geogram/delaunay/periodic_delaunay_3d.cpp
@@ -122,7 +122,11 @@ namespace {
#if defined(GEO_COMPILER_GCC_FAMILY)
return GEO::index_t(Numeric::uint32(__builtin_popcount(x)));
#elif defined(GEO_COMPILER_MSVC)
+ #if defined(_M_ARM64)
+ return GEO::index_t(_CountOneBits(x));
+ #else
return GEO::index_t(__popcnt(x));
+ #endif
#else
int result = 0;
for(int b=0; b<32; ++b) {
2 changes: 1 addition & 1 deletion ports/geogram/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "geogram",
"version": "1.7.6",
"port-version": 2,
"port-version": 3,
"description": "Geogram is a programming library of geometric algorithms.",
"homepage": "https://gforge.inria.fr/projects/geogram/",
"supports": "!uwp",
Expand Down
1 change: 0 additions & 1 deletion scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ gsoap:x86-windows = skip
gsoap:x64-windows-static = skip
gsoap:x64-windows-static-md = skip

geogram:arm64-windows=fail
# Port geotrans source ftp://ftp.nga.mil server
# extremely slow may take several hours to download
geotrans:x64-linux = skip
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2538,7 +2538,7 @@
},
"geogram": {
"baseline": "1.7.6",
"port-version": 2
"port-version": 3
},
"geographiclib": {
"baseline": "2.1.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/geogram.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2be512adda374e08c638f617f81f86b3dc3099a0",
"version": "1.7.6",
"port-version": 3
},
{
"git-tree": "d68db6c8078b7598e5bed6550a911f791ae63ab3",
"version": "1.7.6",
Expand Down