From adb54eb0bb8b44e8a29c1eabadaf7933e44beff8 Mon Sep 17 00:00:00 2001 From: Sing_chan <51314274+betterpig@users.noreply.github.com> Date: Thu, 25 Nov 2021 15:46:56 +0800 Subject: [PATCH] block unknown option /arch:SSE3 (#37439) * block unknown option /arch:SSE3 * modify according to zhouwei's comment --- cmake/configure.cmake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmake/configure.cmake b/cmake/configure.cmake index 7f737cc1895..f15db6e094c 100644 --- a/cmake/configure.cmake +++ b/cmake/configure.cmake @@ -32,11 +32,9 @@ if(WITH_AVX AND AVX_FOUND) set(SIMD_FLAG ${AVX_FLAG}) add_definitions(-DPADDLE_WITH_AVX) elseif(SSE3_FOUND) - set(SIMD_FLAG ${SSE3_FLAG}) -endif() - -if (SSE3_FOUND) - # TODO: Runtime detection should be used here. + if(NOT WIN32) + set(SIMD_FLAG ${SSE3_FLAG}) + endif() add_definitions(-DPADDLE_WITH_SSE3) endif() -- GitLab