From 7bc8b5e273b9b695e082785c06e84e8a8478bc67 Mon Sep 17 00:00:00 2001 From: Lukas Geiger Date: Mon, 29 Jan 2024 14:34:03 +0000 Subject: [PATCH] Fix Windows MINGW build --- contrib/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index a5909e8..050e9b4 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -21,7 +21,9 @@ get_filename_component(gemmlowp_src ${gemmlowp_SOURCE_DIR} PATH) if(WIN32) # one can enable simd from the cmake command line, ie -DCMAKE_CXX_FLAGS="/arch:AVX2 add_definitions(-DNOMINMAX -DWIN64 -DWIN32_LEAN_AND_MEAN -DNOGDI) - add_definitions(/bigobj /nologo /EHsc /GF /MP /Gm- /wd4800 /wd4805 /wd4244) + if(MSVC) + add_definitions(/bigobj /nologo /EHsc /GF /MP /Gm- /wd4800 /wd4805 /wd4244) + endif() if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") # if we compile for windows with clang, allow inline asm add_definitions(-DGEMMLOWP_ALLOW_INLINE_ASM)