Преглед изворни кода

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.
Brad King пре 9 година
родитељ
комит
85e0314201
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Modules/Compiler/GNU.cmake

+ 1 - 1
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")