Fix c++20 compilation in OSS Faiss for OSX ARM64 (#4733)

Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4733

This just fixes OSX compilation. cuVS will come later (https://github.com/rapidsai/cuvs/issues/1659)

Reviewed By: juancarpio27

Differential Revision: D89523723

fbshipit-source-id: 413a1d1d62fa0ff3f5241206e26fcd7e72f2daf1
This commit is contained in:
Michael Norris
2025-12-22 12:05:35 -08:00
committed by meta-codesync[bot]
parent b92db02a90
commit 02300501cd
3 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ project(faiss
LANGUAGES ${FAISS_LANGUAGES})
include(GNUInstallDirs)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR FAISS_ENABLE_CUVS)
if(FAISS_ENABLE_CUVS)
set(CMAKE_CXX_STANDARD 17)
else()
set(CMAKE_CXX_STANDARD 20)
+6
View File
@@ -38,6 +38,7 @@ outputs:
build:
- python {{ python }}
- {{ compiler('cxx') }}
- libcxx =20.1.1 # [osx and arm64]
- sysroot_linux-64 =2.17 # [linux64]
- llvm-openmp # [osx or linux64]
- cmake >=3.24.0
@@ -54,6 +55,7 @@ outputs:
- libopenblas=0.3.30=openmp_h60d53f8_1 # [osx]
host:
- python {{ python }}
- libcxx =20.1.1 # [osx and arm64]
{% if PY_VER == '3.10' or PY_VER == '3.11' %}
- mkl =2024.2.2 # [x86_64]
- python_abi <3.12
@@ -66,6 +68,7 @@ outputs:
- libopenblas=0.3.30=openmp_h60d53f8_1 # [osx]
run:
- python {{ python }}
- libcxx =20.1.1 # [osx and arm64]
{% if PY_VER == '3.10' or PY_VER == '3.11' %}
- mkl =2024.2.2 # [x86_64]
- python_abi <3.12
@@ -96,6 +99,7 @@ outputs:
build:
- python {{ python }}
- {{ compiler('cxx') }}
- libcxx =20.1.1 # [osx and arm64]
- sysroot_linux-64 =2.17 # [linux64]
- swig =4.0
- cmake >=3.24.0
@@ -115,6 +119,7 @@ outputs:
- python {{ python }}
- numpy >=2.0,<3.0
- {{ pin_subpackage('libfaiss', exact=True) }}
- libcxx =20.1.1 # [osx and arm64]
- _openmp_mutex =4.5=2_kmp_llvm # [x86_64 and not win]
{% if PY_VER == '3.10' or PY_VER == '3.11' %}
- mkl =2024.2.2 # [x86_64]
@@ -130,6 +135,7 @@ outputs:
- numpy >=2.0,<3.0
- packaging
- {{ pin_subpackage('libfaiss', exact=True) }}
- libcxx =20.1.1 # [osx and arm64]
{% if PY_VER == '3.10' or PY_VER == '3.11' %}
- mkl =2024.2.2 # [x86_64]
- python_abi <3.12
+1 -1
View File
@@ -10,7 +10,7 @@ project(pyfaiss
HOMEPAGE_URL "https://github.com/facebookresearch/faiss"
LANGUAGES CXX)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR FAISS_ENABLE_CUVS)
if(FAISS_ENABLE_CUVS)
set(CMAKE_CXX_STANDARD 17)
else()
set(CMAKE_CXX_STANDARD 20)