diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e4055895fd..e57fc0b59d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,7 +126,6 @@ set(WIRESHARK_C_FLAGS -Wcast-align -Wformat-security -fexcess-precision=fast - # -fvisibility=hidden ) set(WIRESHARK_C_ONLY_FLAGS @@ -215,6 +214,14 @@ foreach(THIS_FLAG ${WIRESHARK_C_ONLY_FLAGS}) endforeach() message(STATUS "C-Flags: ${CMAKE_C_FLAGS}\nCXX-Flags: ${CMAKE_CXX_FLAGS}") +check_c_compiler_flag(-fvisibility=hidden FVHIDDEN) +if((FVHIDDEN)) + set(COMPILE_HIDE_SYMBOLS -fvisibility=hidden) +else() # TODO add alternate compiler flags for hiding symbols + message(WARNING "Hiding shared library symbols is not supported by the compiler." + " All shared library symbols will be exported.") +endif() + if(NOT DISABLE_WERROR AND NOT ENABLE_EXTRA_GCC_CHECKS) check_c_compiler_flag(-Werror WERROR) else() |