aboutsummaryrefslogtreecommitdiff
path: root/CMake/CurlSymbolHiding.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2020-02-24 13:34:54 +0100
committerJay Satiro <raysatiro@yahoo.com>2020-02-29 23:14:16 -0500
commitfc9312f7175fa36300b3ba6534b54bcd0d00ab7e (patch)
tree1905ddb85c1328c036ae07aa7dc26a17c5086645 /CMake/CurlSymbolHiding.cmake
parent711f022c055ae0932b864699ca8d49c057f07ee1 (diff)
CMake: clean up and improve build procedures
- remove check for unsupported old CMake versions - do not link to c-ares library twice - modernize custom Find modules - FindLibSSH2: - pass version to FPHSA to show it in the output - use LIBSSH2_VERSION define to extract the version number in one shot. This variable exists in the header for 10 years. - remove unneeded code - FindNGHTTP2.cmake: - drop needless FPHSA argument - mark found variables as advanced - FindNSS.cmake: - show version number - FindCARES.cmake: - drop default paths - use FPHSA instead of checking things by hand - remove needless explict variable dereference - simplify count_true() - allow all policies up to version 3.16 to be set to NEW - do not rerun check for -Wstrict-aliasing=3 every time In contrast to every other compiler flag this has a = in it, which CMake can't have in a variable name. - only read the interesting strings from curlver.h Reviewed-by: Peter Wu Closes https://github.com/curl/curl/pull/4975
Diffstat (limited to 'CMake/CurlSymbolHiding.cmake')
-rw-r--r--CMake/CurlSymbolHiding.cmake8
1 files changed, 1 insertions, 7 deletions
diff --git a/CMake/CurlSymbolHiding.cmake b/CMake/CurlSymbolHiding.cmake
index 224755a31..8e5fd67a0 100644
--- a/CMake/CurlSymbolHiding.cmake
+++ b/CMake/CurlSymbolHiding.cmake
@@ -11,13 +11,7 @@ if(CURL_HIDDEN_SYMBOLS)
set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))")
set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden")
elseif(CMAKE_COMPILER_IS_GNUCC)
- if(NOT CMAKE_VERSION VERSION_LESS 2.8.10)
- set(GCC_VERSION ${CMAKE_C_COMPILER_VERSION})
- else()
- execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
- OUTPUT_VARIABLE GCC_VERSION)
- endif()
- if(NOT GCC_VERSION VERSION_LESS 3.4)
+ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
# note: this is considered buggy prior to 4.0 but the autotools don't care, so let's ignore that fact
set(SUPPORTS_SYMBOL_HIDING TRUE)
set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))")