summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2012-11-30 01:03:32 +0000
committerStephen D. Huston <shuston@apache.org>2012-11-30 01:03:32 +0000
commit8c79ea6f55006f8862fcd7c3ad3ac6d24543fea7 (patch)
tree7203f3fa766517192fcc6f7801fa880ab21bc4a1 /qpid/cpp/src
parent9b283c15bc2c5c5637d511e634e5233f1758106b (diff)
downloadqpid-python-8c79ea6f55006f8862fcd7c3ad3ac6d24543fea7.tar.gz
QPID-4484 Add -Wno-attributes to gcc 4.1.2 command line
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1415470 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt
index 579e792b62..c0cc5a4fbd 100644
--- a/qpid/cpp/src/CMakeLists.txt
+++ b/qpid/cpp/src/CMakeLists.txt
@@ -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)