aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/compiler/msvc/settings.cmake6
-rw-r--r--src/common/Define.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake
index 0132c45423a..a8be99d6bae 100644
--- a/cmake/compiler/msvc/settings.cmake
+++ b/cmake/compiler/msvc/settings.cmake
@@ -111,6 +111,12 @@ message(STATUS "MSVC: Disabled NON-SECURE warnings")
target_compile_definitions(trinity-compile-option-interface
INTERFACE
-D_CRT_NONSTDC_NO_WARNINGS)
+
+# Force math constants like M_PI to be available
+target_compile_definitions(trinity-compile-option-interface
+ INTERFACE
+ -D_USE_MATH_DEFINES)
+
message(STATUS "MSVC: Disabled POSIX warnings")
# Ignore specific warnings
diff --git a/src/common/Define.h b/src/common/Define.h
index d1780b33d05..1bcb89117f0 100644
--- a/src/common/Define.h
+++ b/src/common/Define.h
@@ -56,7 +56,6 @@
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
# define TRINITY_PATH_MAX 260
-# define _USE_MATH_DEFINES
#else // TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS
# define TRINITY_PATH_MAX PATH_MAX
#endif // TRINITY_PLATFORM