From c53932d12d468a2593562d80cf014bca3f397ade Mon Sep 17 00:00:00 2001 From: DRC Date: Tue, 23 Sep 2025 08:40:41 -0400 Subject: [PATCH] Win: Don't use GCC/Clang visibility attribute Symbols are hidden by default on Windows, so __attribute__((visibility("hidden"))) produced a warning ("visibility attribute not supported in this configuration; ignored") with certain versions of MinGW if libjpeg-turbo was built without SIMD extensions. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c9b42813..d96f9f5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -525,7 +525,7 @@ if(UNIX) endif() endif() -if(NOT MSVC OR CMAKE_C_COMPILER_ID MATCHES "Clang") +if(NOT WIN32) check_c_source_compiles("extern const int table[1]; const int __attribute__((visibility(\"hidden\"))) table[1] = { 0 }; int main(void) { return table[0]; }" HIDDEN_WORKS) if(HIDDEN_WORKS)