kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #41377
[PATCH v2 3/8] Set _USE_MATH_DEFINES on Windows
All compilers need this in standards-compliant mode.
---
CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ee43d9eb98..c73c86a291 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -245,6 +245,10 @@ if( WIN32 )
# define UNICODE and_UNICODE definition on Windows. KiCad uses unicode.
# Both definitions are required
add_definitions(-DUNICODE -D_UNICODE)
+
+ # In fully standards-compliant mode, M_PI et al. are defined only if
+ # _USE_MATH_DEFINES is set.
+ add_definitions( -D_USE_MATH_DEFINES )
endif()
References