From 1f6efefdf66258f74589bb05e9870e941ef802e2 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Thu, 18 Feb 2021 06:54:24 -0500 Subject: [PATCH] Fix math constants on Windows, such as M_PI, and min and max --- cmake-proxies/cmake-modules/AudacityFunctions.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake-proxies/cmake-modules/AudacityFunctions.cmake b/cmake-proxies/cmake-modules/AudacityFunctions.cmake index 0d45cf875..38c8771cf 100644 --- a/cmake-proxies/cmake-modules/AudacityFunctions.cmake +++ b/cmake-proxies/cmake-modules/AudacityFunctions.cmake @@ -214,7 +214,9 @@ function( audacity_append_common_compiler_options var ) $<$:-Werror=dangling-else> $<$:-Werror=return-stack-address> # Yes, CMake will change -D to /D as needed for Windows: - -DWXINTL_NO_GETTEXT_MACRO + -DWXINTL_NO_GETTEXT_MACRO + $<$:-D_USE_MATH_DEFINES> + $<$:-DNOMINMAX> ) set( ${var} "${${var}}" PARENT_SCOPE ) endfunction()