diff options
Diffstat (limited to 'cmake/libutils.cmake')
-rw-r--r-- | cmake/libutils.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake index 7c13df05ca4..e161b67d25f 100644 --- a/cmake/libutils.cmake +++ b/cmake/libutils.cmake @@ -304,12 +304,15 @@ FUNCTION(GET_DEPENDEND_OS_LIBS target result) SET(${result} ${ret} PARENT_SCOPE) ENDFUNCTION() -MACRO(RESTRICT_SYMBOL_EXPORTS target) +# We try to hide the symbols in yassl/zlib to avoid name clashes with +# other libraries like openssl. +FUNCTION(RESTRICT_SYMBOL_EXPORTS target) SET(VISIBILITY_HIDDEN_FLAG) IF(CMAKE_COMPILER_IS_GNUCXX AND UNIX) CHECK_C_COMPILER_FLAG("-fvisibility=hidden" HAVE_VISIBILITY_HIDDEN) IF(HAVE_VISIBILITY_HIDDEN) + MESSAGE(STATUS "HAVE_VISIBILITY_HIDDEN") SET(VISIBILITY_HIDDEN_FLAG "-fvisibility=hidden") ENDIF() ENDIF() @@ -327,5 +330,4 @@ MACRO(RESTRICT_SYMBOL_EXPORTS target) SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} ${VISIBILITY_HIDDEN_FLAG}") ENDIF() - -ENDMACRO() +ENDFUNCTION() |