From a7c6dbf821988d356b79c71db8d658c43b0d6bbc Mon Sep 17 00:00:00 2001 From: Vollstrecker Date: Wed, 11 Dec 2024 09:08:47 +0100 Subject: CMake: Detect visibility attribute in MSVC. --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) 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) # # Check visibility attribute is supported +# +if(MSVC) + set(CMAKE_REQUIRED_FLAGS "-WX") +else(MSVC) + set(CMAKE_REQUIRED_FLAGS "-WError") +endif(MSVC) + check_c_source_compiles( " #include -- cgit v1.2.3-55-g6feb