diff options
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | cmake/msvc/config.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ca13431cd5..ba43f97a80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,6 +148,10 @@ if(MSVC) add_definitions(/bigobj) #allow for larger object files endif(MSVC) +if(WIN32) + add_definitions(-D_USE_MATH_DEFINES) +endif(WIN32) + # Record Compiler Info for record STRING(TOUPPER ${CMAKE_BUILD_TYPE} GRCBTU) set(COMPILER_INFO "") diff --git a/cmake/msvc/config.h b/cmake/msvc/config.h index 99a2ea0f89..db0088e3a9 100644 --- a/cmake/msvc/config.h +++ b/cmake/msvc/config.h @@ -21,7 +21,6 @@ typedef ptrdiff_t ssize_t; //////////////////////////////////////////////////////////////////////// // rint functions //////////////////////////////////////////////////////////////////////// -#define _USE_MATH_DEFINES #include <math.h> #if _MSC_VER < 1800 static inline long lrint(double x){return (long)(x > 0.0 ? x + 0.5 : x - 0.5);} |