commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 02/03: CMake: Fix math macros not available


From: git
Subject: [Commit-gnuradio] [gnuradio] 02/03: CMake: Fix math macros not available on MinGW
Date: Fri, 11 Nov 2016 21:19:05 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit 9fd93c0a940feb6afb7ff587c8b3b17920aedf12
Author: Paul Cercueil <address@hidden>
Date:   Wed Nov 9 11:41:43 2016 +0100

    CMake: Fix math macros not available on MinGW
    
    Signed-off-by: Paul Cercueil <address@hidden>
---
 CMakeLists.txt      | 4 ++++
 cmake/msvc/config.h | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca13431..ba43f97 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 99a2ea0..db0088e 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);}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]