You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by sh...@apache.org on 2012/11/30 02:03:33 UTC

svn commit: r1415470 - /qpid/trunk/qpid/cpp/src/CMakeLists.txt

Author: shuston
Date: Fri Nov 30 01:03:32 2012
New Revision: 1415470

URL: http://svn.apache.org/viewvc?rev=1415470&view=rev
Log:
QPID-4484 Add -Wno-attributes to gcc 4.1.2 command line

Modified:
    qpid/trunk/qpid/cpp/src/CMakeLists.txt

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=1415470&r1=1415469&r2=1415470&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Fri Nov 30 01:03:32 2012
@@ -277,7 +277,15 @@ if (CMAKE_COMPILER_IS_GNUCXX)
       set (CATCH_UNDEFINED "")
    endif (CMAKE_SYSTEM_NAME STREQUAL SunOS)
    set (COMPILER_FLAGS "-fvisibility-inlines-hidden")
-   set (HIDE_SYMBOL_FLAGS "-fvisibility=hidden")
+   # gcc 4.1.2 on RHEL 5 needs -Wno-attributes to avoid an error that's fixed
+   # in later gcc versions.
+   execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
+                   OUTPUT_VARIABLE GCC_VERSION)
+   if (GCC_VERSION VERSION_EQUAL 4.1.2)
+     set (HIDE_SYMBOL_FLAGS "-fvisibility=hidden -Wno-attributes")
+   else (GCC_VERSION VERSION_EQUAL 4.1.2)
+     set (HIDE_SYMBOL_FLAGS "-fvisibility=hidden")
+   endif (GCC_VERSION VERSION_EQUAL 4.1.2)
 endif (CMAKE_COMPILER_IS_GNUCXX)
 
 if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org