diff options
| author | Stephen D. Huston <shuston@apache.org> | 2012-11-30 01:03:32 +0000 |
|---|---|---|
| committer | Stephen D. Huston <shuston@apache.org> | 2012-11-30 01:03:32 +0000 |
| commit | 5a162282b448b7cef69a2c52103458f16b3b09d2 (patch) | |
| tree | f8a18842cb4424953df82ef5f5d11ed1415a4e26 /cpp | |
| parent | 52f1dd64673f3e0e5c86c82e33ea2043e5b86d6d (diff) | |
| download | qpid-python-5a162282b448b7cef69a2c52103458f16b3b09d2.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/qpid@1415470 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/src/CMakeLists.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt index 579e792b62..c0cc5a4fbd 100644 --- a/cpp/src/CMakeLists.txt +++ b/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) |
