diff options
author | Brad King <brad.king@kitware.com> | 2016-08-02 13:24:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-02 13:24:54 (GMT) |
commit | 85e0314201005c923420eb650a9629e38356b77a (patch) | |
tree | 04a0cc2b11cee1e6131349fbb6d61ed59ffb00e8 /Modules/Compiler | |
parent | fd59f9ad519c1c311c54569133797d9061e90558 (diff) | |
download | CMake-85e0314201005c923420eb650a9629e38356b77a.zip CMake-85e0314201005c923420eb650a9629e38356b77a.tar.gz CMake-85e0314201005c923420eb650a9629e38356b77a.tar.bz2 |
GNU: Use -fvisibility on GCC 4.0 and 4.1 too
This flag is needed for the `<LANG>_VISIBILITY_PRESET` target property.
It has been supported since GCC 4.0, not 4.2 as we previously recorded.
Fixes #16222.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/GNU.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index 34d4eaf..4d2fe5b 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -25,7 +25,7 @@ macro(__compiler_gnu lang) if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.4) set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE") endif() - if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.2) + if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.0) set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=") endif() set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC") |