summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-05-27 15:33:37 (GMT)
committerBrad King <brad.king@kitware.com>2009-05-27 15:33:37 (GMT)
commita6bc1c34b17d90f7e3f68f17353681288e68f8a5 (patch)
treecf35396ff4c3d1a6e20bb2b4ae7b2db4d4561fe1 /Modules
parentbd1e91a460bfbd2ccd629181e7c5382feaa9483f (diff)
downloadCMake-a6bc1c34b17d90f7e3f68f17353681288e68f8a5.zip
CMake-a6bc1c34b17d90f7e3f68f17353681288e68f8a5.tar.gz
CMake-a6bc1c34b17d90f7e3f68f17353681288e68f8a5.tar.bz2
ENH: Auto-import symbols for cygwin executables
This enables the --enable-auto-import linker flag on Cygwin when linking executables. It works with the old gcc 3.x compiler and is necessary for the new gcc 4.x compiler. See issue #9071.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/CYGWIN.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/Platform/CYGWIN.cmake b/Modules/Platform/CYGWIN.cmake
index c9170a0..dd179a4 100644
--- a/Modules/Platform/CYGWIN.cmake
+++ b/Modules/Platform/CYGWIN.cmake
@@ -1,6 +1,7 @@
SET(WIN32 1)
SET(CYGWIN 1)
+SET(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,--enable-auto-import")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,--export-all-symbols -Wl,--enable-auto-import")
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
SET(CMAKE_DL_LIBS "-lgdi32" )