From 85e0314201005c923420eb650a9629e38356b77a Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 2 Aug 2016 09:24:54 -0400 Subject: GNU: Use -fvisibility on GCC 4.0 and 4.1 too This flag is needed for the `_VISIBILITY_PRESET` target property. It has been supported since GCC 4.0, not 4.2 as we previously recorded. Fixes #16222. --- Modules/Compiler/GNU.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- cgit v0.12