commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 09/11: cmake: If Ice 3.4 found, check versi


From: git
Subject: [Commit-gnuradio] [gnuradio] 09/11: cmake: If Ice 3.4 found, check version of GCC and disable if >= 4.7.
Date: Thu, 9 Jan 2014 21:52:40 +0000 (UTC)

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

trondeau pushed a commit to branch maint
in repository gnuradio.

commit 7fcf514bab5d62aefec0d7741c720af76666b3f1
Author: Tom Rondeau <address@hidden>
Date:   Thu Jan 9 10:29:43 2014 -0500

    cmake: If Ice 3.4 found, check version of GCC and disable if >= 4.7.
---
 cmake/Modules/FindICE.cmake | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/cmake/Modules/FindICE.cmake b/cmake/Modules/FindICE.cmake
index 85144b3..d7c6f79 100644
--- a/cmake/Modules/FindICE.cmake
+++ b/cmake/Modules/FindICE.cmake
@@ -112,6 +112,18 @@ if(ICE_ICE AND ICE_ICEUTIL)
   if(ICE_FOUND)
     message(STATUS "Ice-3.4 found")
 
+    if(CMAKE_COMPILER_IS_GNUCXX)
+      execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+        OUTPUT_VARIABLE gcc_version)
+      string(REGEX MATCH "[0-9].[0-9].[0-9]" gcc_version_num ${gcc_version})
+      if(NOT ${gcc_version_num} VERSION_LESS "4.7")
+        message(STATUS "-- Found GCC version: ${gcc_version_num}")
+        message(STATUS "-- GCC incompatible with Ice 3.4, disabling 
ControlPort")
+        set(ICE_FOUND FALSE)
+        return() # exit now
+      endif(NOT ${gcc_version_num} VERSION_LESS "4.7")
+    endif(CMAKE_COMPILER_IS_GNUCXX)
+
     set(ICE_LIBRARIES ${ICE_LIBRARY})
     set(ICE_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
 



reply via email to

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