From e2fefc373f64d6c5ffe1a3edc713eaa585307eae Mon Sep 17 00:00:00 2001 From: askmyteapot <62238146+askmyteapot@users.noreply.github.com> Date: Thu, 10 Apr 2025 18:58:12 +1000 Subject: [PATCH] Update CMakeLists.txt - Fix source for ggml-cpu (#1474) * Update CMakeLists.txt - Fix source for ggml-cpu * Fixes std::min adding compile define NOMINMAX seems to fix the further compile issues --- CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e38be601a..ecd50ab7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,6 +65,7 @@ find_package(Threads REQUIRED) add_compile_definitions(LOG_DISABLE_LOGS) add_compile_definitions(GGML_USE_CPU) add_compile_definitions(GGML_USE_CPU_AARCH64) +add_compile_definitions(NOMINMAX) if (MSVC) add_compile_options("$<$:/utf-8>") @@ -423,11 +424,11 @@ add_library(ggml ggml/src/ggml-cpu/binary-ops.cpp ggml/src/ggml-cpu/unary-ops.h ggml/src/ggml-cpu/unary-ops.cpp - ggml-cpu/simd-mappings.h - ggml-cpu/vec.h - ggml-cpu/vec.cpp - ggml-cpu/ops.h - ggml-cpu/ops.cpp + ggml/src/ggml-cpu/simd-mappings.h + ggml/src/ggml-cpu/vec.h + ggml/src/ggml-cpu/vec.cpp + ggml/src/ggml-cpu/ops.h + ggml/src/ggml-cpu/ops.cpp ggml/src/ggml-backend-reg.cpp ggml/include/gguf.h ggml/src/gguf.cpp