1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 15:49:41 +02:00

Fix math constants on Windows, such as M_PI, and min and max

This commit is contained in:
Paul Licameli 2021-02-18 06:54:24 -05:00 committed by Leland Lucius
parent fe8659f435
commit 1f6efefdf6

View File

@ -214,7 +214,9 @@ function( audacity_append_common_compiler_options var )
$<$<CXX_COMPILER_ID:AppleClang,Clang>:-Werror=dangling-else>
$<$<CXX_COMPILER_ID:AppleClang,Clang>:-Werror=return-stack-address>
# Yes, CMake will change -D to /D as needed for Windows:
-DWXINTL_NO_GETTEXT_MACRO
-DWXINTL_NO_GETTEXT_MACRO
$<$<CXX_COMPILER_ID:MSVC>:-D_USE_MATH_DEFINES>
$<$<CXX_COMPILER_ID:MSVC>:-DNOMINMAX>
)
set( ${var} "${${var}}" PARENT_SCOPE )
endfunction()