From 6dbb70cd9b1aa3cbce47f984407a7a4360fb94e4 Mon Sep 17 00:00:00 2001 From: nihui Date: Tue, 24 Dec 2024 15:58:28 +0800 Subject: [PATCH] Update CMakeLists.txt --- src/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cd5f9b6728d..c97235d97a0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -348,6 +348,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC" OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang target_compile_options(ncnn PRIVATE /fp:fast) endif() + if(NCNN_TARGET_ARCH STREQUAL "arm") + # disable msvc svml optimization on arm target as it produces wrong result + target_compile_options(ncnn PRIVATE /d2Qvec-mathlib-) + endif() + if(NCNN_SHARED_LIB) # msvc argues about stl string and vector uses in exported functions target_compile_options(ncnn PRIVATE /wd4251)