diff options
author | Tobias Hieta <tobias@plex.tv> | 2020-11-10 10:30:29 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-11-10 23:40:33 +0100 |
commit | fd5f35ef0b5635fae2bc39335d6339c96b843b33 (patch) | |
tree | fc63f374aaa2b75ec77b8661ad0d7d666a67981a /CMake/CurlSymbolHiding.cmake | |
parent | c49d205ae021d9e02e0466905d4aac49665b2b19 (diff) | |
download | curl-fd5f35ef0b5635fae2bc39335d6339c96b843b33.tar.gz |
cmake: don't pass -fvisibility=hidden to clang-cl on Windows
When using clang-cl on windows -fvisibility=hidden is not an known
argument. Instead it behaves exactly like MSVC in this case. So let's
make sure we take that path.
In CMake clang-cl sets both CMAKE_C_COMPILER_ID=clang and MSVC get's
defined since clang-cl is basically a MSVC emulator. So guarding like we
do in this patch seems logical.
Reviewed-by: Jakub Zakrzewski
Closes #6194
Diffstat (limited to 'CMake/CurlSymbolHiding.cmake')
-rw-r--r-- | CMake/CurlSymbolHiding.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMake/CurlSymbolHiding.cmake b/CMake/CurlSymbolHiding.cmake index f8500a845..e99ea6f64 100644 --- a/CMake/CurlSymbolHiding.cmake +++ b/CMake/CurlSymbolHiding.cmake @@ -27,7 +27,7 @@ mark_as_advanced(CURL_HIDDEN_SYMBOLS) if(CURL_HIDDEN_SYMBOLS) set(SUPPORTS_SYMBOL_HIDING FALSE) - if(CMAKE_C_COMPILER_ID MATCHES "Clang") + if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT MSVC) set(SUPPORTS_SYMBOL_HIDING TRUE) set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))") set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden") |