From 96c9cf5942c9bdb05061d869df9048e0679f4dfe Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Tue, 10 Dec 2024 13:20:03 +0100 Subject: [PATCH] Atomic for arm64 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 43fa086..1564b16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(WVLET_STATIC_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third-party/linux-arm64_libwvlet.a") set(WVLET_DYNAMIC_URL "https://github.com/quackscience/wvlet-lib/releases/download/latest/linux-arm64_libwvlet.so") set(WVLET_DYNAMIC_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third-party/linux-arm64_libwvlet.so") - string(APPEND _GNU_COMMON_C_CXX_FLAGS " -mno-outline-atomics") endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(WVLET_STATIC_URL "https://github.com/quackscience/wvlet-lib/releases/download/latest/mac-arm64_libwvlet.a") @@ -82,6 +81,11 @@ set(STATIC_LIBS OpenSSL::SSL ) +if(VCPKG_TARGET_TRIPLET MATCHES "arm64-linux") + string(APPEND _GNU_COMMON_C_CXX_FLAGS " -mno-outline-atomics") + list(APPEND STATIC_LIBS atomic) +endif() + # For static extension, use static library with correct link order target_link_libraries(${EXTENSION_NAME} # ${WVLET_DYNAMIC_PATH}