瀏覽代碼

Use proper gcc < 4.5 comparison for visibility flags.

Sascha Zelzer 13 年之前
父節點
當前提交
709438144b
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      CMake/ctkMacroBuildPlugin.cmake
  2. 1 1
      CMakeLists.txt

+ 1 - 1
CMake/ctkMacroBuildPlugin.cmake

@@ -288,7 +288,7 @@ MACRO(ctkMacroBuildPlugin)
   # directives for the third-party headers between "#pragma visibility push/pop"
   # statements, it is generally safer to just use default visibility with
   # gcc < 4.5.
-  IF(CMAKE_COMPILER_IS_GNUCXX AND ${GCC_VERSION} VERSION_GREATER "4.4.0" AND NOT MINGW)
+  IF(CMAKE_COMPILER_IS_GNUCXX AND NOT ${GCC_VERSION} VERSION_LESS "4.5" AND NOT MINGW)
     SET(plugin_compile_flags "${plugin_compile_flags} -fvisibility=hidden -fvisibility-inlines-hidden")
   ENDIF()
 

+ 1 - 1
CMakeLists.txt

@@ -278,7 +278,7 @@ ctkFunctionGetGccVersion(${CMAKE_CXX_COMPILER} GCC_VERSION)
 # directives for the third-party headers between "#pragma visibility push/pop"
 # statements, it is generally safer to just use default visibility with
 # gcc < 4.5.
-IF(CMAKE_COMPILER_IS_GNUCXX AND ${GCC_VERSION} VERSION_GREATER "4.4.0" AND NOT MINGW)
+IF(CMAKE_COMPILER_IS_GNUCXX AND NOT ${GCC_VERSION} VERSION_LESS "4.5" AND NOT MINGW)
   SET(VISIBILITY_CXX_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden")
 ENDIF()