summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-12 16:25:19 (GMT)
committerBrad King <brad.king@kitware.com>2018-01-12 16:50:10 (GMT)
commite1f0518de09a54065459a728993563d84fb85a6a (patch)
tree27cea0c41f0992d817d488c08f9a488dfabf0e45 /Modules/Platform
parenteae0a85d84fe12f058f8542aa4d05cfdf5c61cb1 (diff)
downloadCMake-e1f0518de09a54065459a728993563d84fb85a6a.zip
CMake-e1f0518de09a54065459a728993563d84fb85a6a.tar.gz
CMake-e1f0518de09a54065459a728993563d84fb85a6a.tar.bz2
GNU: Use -fvisibility on AIX when supported
Revise the logic from commit v3.7.0-rc1~173^2~2 (GNU: Do not use -fvisibility on AIX or HP-UX, 2016-09-03) to add a version check. The GCC 7 release notes [1] state that visibility support has been added for AIX 7.1 and above. [1] https://gcc.gnu.org/gcc-7/changes.html
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/AIX-GNU.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake
index 7f08c4a..0abbb61 100644
--- a/Modules/Platform/AIX-GNU.cmake
+++ b/Modules/Platform/AIX-GNU.cmake
@@ -24,5 +24,7 @@ macro(__aix_compiler_gnu lang)
set(CMAKE_${lang}_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH 1)
set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath")
- unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY)
+ if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 7 OR CMAKE_SYSTEM_VERSION VERSION_LESS 7.1)
+ unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY)
+ endif()
endmacro()