From 93a03113fe7d4eabf8816c08faccb096ab90170f Mon Sep 17 00:00:00 2001 From: ryfactor <6005108+ryfactor@users.noreply.github.com> Date: Wed, 4 Nov 2026 22:18:27 +1300 Subject: [PATCH] Set _USE_MATH_DEFINES for MinGW32 builds Add CMAKE_CXX_FLAGS for MinGW32 to define _USE_MATH_DEFINES --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a75528373..1337c9964 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ elseif(WIN32) if(MINGW) set(CMAKE_EXE_LINKER_FLAGS -mwindows) + set(CMAKE_CXX_FLAGS "-D_USE_MATH_DEFINES ${CMAKE_CXX_FLAGS}") endif(MINGW) # This is bad. To remove below defines, FeLib should switch to std::chrono and serialize time since common epoch.