From 1d2ba7f6df721d55914bff67d3abbb539fe2692c Mon Sep 17 00:00:00 2001 From: WhiredPlanck Date: Mon, 23 Oct 2023 21:52:34 +0800 Subject: [PATCH] build: slightly refactor to cmake user make rules --- cmake/cxx_flag_overrides.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/cxx_flag_overrides.cmake b/cmake/cxx_flag_overrides.cmake index 9f4fc5d4c..635489e3d 100644 --- a/cmake/cxx_flag_overrides.cmake +++ b/cmake/cxx_flag_overrides.cmake @@ -4,10 +4,10 @@ if(WIN32) set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1 /D NDEBUG") set(CMAKE_CXX_FLAGS_RELEASE_INIT "/MT /O2 /Ob2 /D NDEBUG") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /Od /Ob1 /D NDEBUG") - elseif(NOT MINGW) + elseif(MINGW) set(CMAKE_CXX_FLAGS_RELEASE_INIT "-D_MT -O3 -DNDEBUG") - set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-error=deprecated-declarations") else() set(CMAKE_CXX_FLAGS_RELEASE_INIT "-D_MT -O3 -DNDEBUG") + set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-error=deprecated-declarations") endif() endif()