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.
This commit is contained in:
Yaakov Selkowitz 2010-05-27 14:41:28 -04:00 committed by Brad King
parent 282a119e35
commit cd3a4f0025
1 changed files with 1 additions and 0 deletions

View File

@ -45,6 +45,7 @@ macro(__cygwin_compiler_gnu lang)
SET(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic") SET(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic")
ENDFOREACH(type) ENDFOREACH(type)
set(CMAKE_EXE_EXPORTS_${lang}_FLAG "-Wl,--export-all-symbols")
# TODO: Is -Wl,--enable-auto-import now always default? # 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_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}") set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS}")