diff --git a/ExampleDependencies/CMakeLists.txt b/ExampleDependencies/CMakeLists.txt index bfb865c..4578cab 100644 --- a/ExampleDependencies/CMakeLists.txt +++ b/ExampleDependencies/CMakeLists.txt @@ -32,18 +32,13 @@ find_package(ManiVault COMPONENTS Core PointData CONFIG QUIET) CPMAddPackage( NAME highway - URL https://github.com/google/highway/archive/refs/tags/1.2.0.tar.gz - URL_HASH SHA256=7e0be78b8318e8bdbf6fa545d2ecb4c90f947df03f7aadc42c1967f019e63343 - PATCHES - "cmake/highway-win.patch" # from https://github.com/conan-io/conan-center-index/pull/24197/files, fixes https://github.com/google/highway/issues/2225 - "cmake/highway-apple-arm.patch" # from https://github.com/Homebrew/homebrew-core/blob/d55553b062fab1ddfc3ea0c8f41725f0b2584f10/Formula/h/highway.rb, fixes https://github.com/google/highway/issues/2317 + GITHUB_REPOSITORY "google/highway" + GIT_TAG 1.3.0 OPTIONS "HWY_ENABLE_EXAMPLES OFF" "HWY_ENABLE_INSTALL OFF" "HWY_ENABLE_TESTS OFF" "HWY_ENABLE_CONTRIB ON" "BUILD_SHARED_LIBS ON" ) -if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set_target_properties(hwy_test PROPERTIES EXCLUDE_FROM_ALL True) - set_target_properties(hwy_list_targets PROPERTIES EXCLUDE_FROM_ALL True) -endif() +set_target_properties(hwy_test PROPERTIES EXCLUDE_FROM_ALL True) +set_target_properties(hwy_list_targets PROPERTIES EXCLUDE_FROM_ALL True) if(${MV_EXAMPLES_USE_VCPKG}) find_package(blake3 CONFIG REQUIRED) diff --git a/ExampleDependencies/cmake/highway-apple-arm.patch b/ExampleDependencies/cmake/highway-apple-arm.patch deleted file mode 100644 index a4859e1..0000000 --- a/ExampleDependencies/cmake/highway-apple-arm.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/hwy/detect_targets.h b/hwy/detect_targets.h -index a8d4a13f..e0ffb33a 100644 ---- a/hwy/detect_targets.h -+++ b/hwy/detect_targets.h -@@ -223,8 +223,12 @@ - #endif - - // SVE[2] require recent clang or gcc versions. -+// -+// SVE is not supported on Apple arm64 CPUs and also crashes the compiler: -+// https://github.com/llvm/llvm-project/issues/97198 - #if (HWY_COMPILER_CLANG && HWY_COMPILER_CLANG < 1100) || \ -- (HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1000) -+ (HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1000) || \ -+ (HWY_OS_APPLE && HWY_ARCH_ARM_A64) - #define HWY_BROKEN_SVE (HWY_SVE | HWY_SVE2 | HWY_SVE_256 | HWY_SVE2_128) - #else - #define HWY_BROKEN_SVE 0 \ No newline at end of file diff --git a/ExampleDependencies/cmake/highway-win.patch b/ExampleDependencies/cmake/highway-win.patch deleted file mode 100644 index 647a64f..0000000 --- a/ExampleDependencies/cmake/highway-win.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff --git a/hwy/contrib/thread_pool/topology.cc b/hwy/contrib/thread_pool/topology.cc -index 3d24f4f..17f3563 100644 ---- a/hwy/contrib/thread_pool/topology.cc -+++ b/hwy/contrib/thread_pool/topology.cc -@@ -64,7 +64,7 @@ - - namespace hwy { - --HWY_DLLEXPORT bool HaveThreadingSupport() { -+HWY_CONTRIB_DLLEXPORT bool HaveThreadingSupport() { - #if HWY_ARCH_WASM - return emscripten_has_threading_support() != 0; - #else -@@ -72,7 +72,7 @@ HWY_DLLEXPORT bool HaveThreadingSupport() { - #endif - } - --HWY_DLLEXPORT size_t TotalLogicalProcessors() { -+HWY_CONTRIB_DLLEXPORT size_t TotalLogicalProcessors() { - size_t lp = 0; - #if HWY_ARCH_WASM - const int num_cores = emscripten_num_logical_cores(); -@@ -111,7 +111,7 @@ HWY_DLLEXPORT size_t TotalLogicalProcessors() { - #include - #endif - --HWY_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps) { -+HWY_CONTRIB_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps) { - #if HWY_OS_WIN - // Only support the first 64 because WINE does not support processor groups. - const HANDLE hThread = GetCurrentThread(); -@@ -173,7 +173,7 @@ HWY_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps) { - #endif - } - --HWY_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps) { -+HWY_CONTRIB_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps) { - #if HWY_OS_WIN - const HANDLE hThread = GetCurrentThread(); - const DWORD_PTR prev = SetThreadAffinityMask(hThread, lps.Get64()); -@@ -385,7 +385,7 @@ std::vector DetectPackages(std::vector& lps) { - } // namespace - #endif // HWY_OS_LINUX - --HWY_DLLEXPORT Topology::Topology() { -+HWY_CONTRIB_DLLEXPORT Topology::Topology() { - #if HWY_OS_LINUX - lps.resize(TotalLogicalProcessors()); - const std::vector& per_package = DetectPackages(lps); -diff --git a/hwy/contrib/thread_pool/topology.h b/hwy/contrib/thread_pool/topology.h -index 95b0835..f80fc47 100644 ---- a/hwy/contrib/thread_pool/topology.h -+++ b/hwy/contrib/thread_pool/topology.h -@@ -28,7 +28,7 @@ - namespace hwy { - - // Returns false if std::thread should not be used. --HWY_DLLEXPORT bool HaveThreadingSupport(); -+HWY_CONTRIB_DLLEXPORT bool HaveThreadingSupport(); - - // Upper bound on logical processors, including hyperthreads. - static constexpr size_t kMaxLogicalProcessors = 1024; // matches glibc -@@ -38,12 +38,12 @@ using LogicalProcessorSet = BitSet4096; - - // Returns false, or sets `lps` to all logical processors which are online and - // available to the current thread. --HWY_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps); -+HWY_CONTRIB_DLLEXPORT bool GetThreadAffinity(LogicalProcessorSet& lps); - - // Ensures the current thread can only run on the logical processors in `lps`. - // Returns false if not supported (in particular on Apple), or if the - // intersection between `lps` and `GetThreadAffinity` is the empty set. --HWY_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps); -+HWY_CONTRIB_DLLEXPORT bool SetThreadAffinity(const LogicalProcessorSet& lps); - - // Returns false, or ensures the current thread will only run on `lp`, which - // must not exceed `TotalLogicalProcessors`. Note that this merely calls -@@ -58,11 +58,11 @@ static inline bool PinThreadToLogicalProcessor(size_t lp) { - // provided by the hardware clamped to `kMaxLogicalProcessors`. - // These processors are not necessarily all usable; you can determine which are - // via GetThreadAffinity(). --HWY_DLLEXPORT size_t TotalLogicalProcessors(); -+HWY_CONTRIB_DLLEXPORT size_t TotalLogicalProcessors(); - - struct Topology { - // Caller must check packages.empty(); if so, do not use any fields. -- HWY_DLLEXPORT Topology(); -+ HWY_CONTRIB_DLLEXPORT Topology(); - - // Clique of cores with lower latency to each other. On Apple M1 these are - // four cores sharing an L2. On Zen4 these 'CCX' are up to eight cores sharing \ No newline at end of file