From cd3a4f00255d0000ccf0310793f39010666d7021 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 27 May 2010 14:41:28 -0400 Subject: [PATCH] Cygwin: Export all symbols with ENABLE_EXPORTS The ENABLE_EXPORTS property exports all symbols from executables on UNIX-like platforms, typically for use by plugins. Honor this behavior on Cygwin. See issue #10122. --- Modules/Platform/CYGWIN-GNU.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/Platform/CYGWIN-GNU.cmake b/Modules/Platform/CYGWIN-GNU.cmake index 6a80f62d4..24bb92aa2 100644 --- a/Modules/Platform/CYGWIN-GNU.cmake +++ b/Modules/Platform/CYGWIN-GNU.cmake @@ -45,6 +45,7 @@ macro(__cygwin_compiler_gnu lang) SET(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic") ENDFOREACH(type) + set(CMAKE_EXE_EXPORTS_${lang}_FLAG "-Wl,--export-all-symbols") # TODO: Is -Wl,--enable-auto-import now always default? set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,--enable-auto-import") set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS}")