aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVollstrecker <werner@vollstreckernet.de>2024-12-11 09:08:47 +0100
committerMark Adler <madler@alumni.caltech.edu>2025-01-31 19:59:10 -0800
commita7c6dbf821988d356b79c71db8d658c43b0d6bbc (patch)
treea0a650dc6c170cee03adda55f5e5e613845824eb
parent79d96ebdb7f75ea5ac73adca12d3f125981a1f5c (diff)
downloadzlib-a7c6dbf821988d356b79c71db8d658c43b0d6bbc.tar.gz
zlib-a7c6dbf821988d356b79c71db8d658c43b0d6bbc.tar.bz2
zlib-a7c6dbf821988d356b79c71db8d658c43b0d6bbc.zip
CMake: Detect visibility attribute in MSVC.
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4fd462a..0974c55 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,6 +80,13 @@ check_include_file(unistd.h HAVE_UNISTD_H)
80 80
81# 81#
82# Check visibility attribute is supported 82# Check visibility attribute is supported
83#
84if(MSVC)
85 set(CMAKE_REQUIRED_FLAGS "-WX")
86else(MSVC)
87 set(CMAKE_REQUIRED_FLAGS "-WError")
88endif(MSVC)
89
83check_c_source_compiles( 90check_c_source_compiles(
84 " 91 "
85 #include <stdlib.h> 92 #include <stdlib.h>