diff options
author | Brad King <brad.king@kitware.com> | 2009-05-27 15:33:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-05-27 15:33:37 (GMT) |
commit | a6bc1c34b17d90f7e3f68f17353681288e68f8a5 (patch) | |
tree | cf35396ff4c3d1a6e20bb2b4ae7b2db4d4561fe1 /bootstrap | |
parent | bd1e91a460bfbd2ccd629181e7c5382feaa9483f (diff) | |
download | CMake-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 'bootstrap')
-rwxr-xr-x | bootstrap | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -55,6 +55,13 @@ cmake_bootstrap_system_libs="" cmake_bootstrap_qt_gui="" cmake_bootstrap_qt_qmake="" +# Determine whether this is a Cygwin environment. +if echo "${cmake_system}" | grep CYGWIN >/dev/null 2>&1; then + cmake_system_cygwin=true +else + cmake_system_cygwin=false +fi + # Determine whether this is a MinGW environment. if echo "${cmake_system}" | grep MINGW >/dev/null 2>&1; then cmake_system_mingw=true @@ -598,6 +605,11 @@ cmake_c_flags=${CFLAGS} cmake_cxx_flags=${CXXFLAGS} cmake_ld_flags=${LDFLAGS} +# Add Cygwin-specific flags +if ${cmake_system_cygwin}; then + cmake_ld_flags="${LDFLAGS} -Wl,--enable-auto-import" +fi + # Add Carbon framework on Darwin if ${cmake_system_darwin}; then cmake_ld_flags="${LDFLAGS} -framework Carbon" |