[yade] 02/03: Pass -ftrack-macro-expansion=0 only if gcc>=4.8. (Closes: #726009)

Anton Gladky gladk at alioth.debian.org
Thu Oct 31 06:57:04 UTC 2013


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

gladk pushed a commit to branch master
in repository yade.

commit cf3f8d9f755b72b0da295e7220ac39ced6ad3a4d
Author: Anton Gladky <gladky.anton at gmail.com>
Date:   Wed Oct 30 20:53:26 2013 +0100

    Pass -ftrack-macro-expansion=0 only if gcc>=4.8. (Closes: #726009)
---
 debian/patches/20_disable_release-mode.patch |   24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/debian/patches/20_disable_release-mode.patch b/debian/patches/20_disable_release-mode.patch
index cac3f30..67d8b8f 100644
--- a/debian/patches/20_disable_release-mode.patch
+++ b/debian/patches/20_disable_release-mode.patch
@@ -6,11 +6,31 @@ Description: disable release-mode in cmake.
 Author: Anton Gladky <gladk at debian.org>
 Origin: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701231#12
 Bug-Debian: http://bugs.debian.org/726009
-Last-Update: 2013-10-15
+Last-Update: 2013-10-30
 
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -46,7 +46,6 @@
+@@ -39,6 +39,19 @@
+ INCLUDE(FindPythonModule)
+ INCLUDE(GNUInstallDirs)
+ #===========================================================
++# HACK!!! If the version of gcc is 4.8 or greater, we add -ftrack-macro-expansion=0 
++# to compiler to reduce the memory consumption during compilation step.
++# See http://bugs.debian.org/726009 for more information
++# Can be removed later, if gcc fixes its regression
++# Taken from http://stackoverflow.com/questions/4058565/check-gcc-minor-in-cmake
++ 
++EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
++IF (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
++  MESSAGE(STATUS "GCC Version >= 4.8. Adding -ftrack-macro-expansion=0")
++  SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -ftrack-macro-expansion=0 ")
++ENDIF()
++
++#===========================================================
+ IF (CMAKE_CXX_FLAGS)
+   #If flags are set, add only neccessary flags
+   IF (DEBUG)
+@@ -46,7 +59,6 @@
      SET(CMAKE_BUILD_TYPE Debug)
      SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DYADE_PTR_CAST=static_pointer_cast -DYADE_CAST=static_cast -DYADE_DEBUG")
    ELSE (DEBUG)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/yade.git



More information about the debian-science-commits mailing list