From 9b3d826bc14cdd62888dd0820986c4035377c7c9 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 7 Nov 2013 08:26:32 -0600 Subject: [PATCH] switch to static linking of libstdc++ on windows --- CMakeLists.txt | 15 +++------------ Documentation/compiling/build-config.txt | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe4ef5a6ec..decaefbe36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,16 +113,7 @@ if( CMAKE_COMPILER_IS_GNUCXX ) set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG" ) if( MINGW ) - # Set default flags for Release build. - # Use a static link for libstdc++ reduce the starting time for Pcbnew (and eeschema) - # (10 times faster) - # This problem is caused by large relocation table and inefficient MinGW implementation - # see http://sourceforge.net/p/mingw/bugs/1747/ and also - # http://stackoverflow.com/questions/15310996/clang-slow-startup-using-mingw - set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s -static-libstdc++" ) - - # Set default flags for Debug build. - set( CMAKE_MODULE_LINKER_FLAGS "-static-libstdc++") + set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" ) else() # We build DLL/DSOs from static libraries, so create position independent code @@ -274,9 +265,9 @@ include( download_boost ) # On Apple only wxwidgets 2.9 or higher doesn't need to find aui part of base if( APPLE ) find_package( wxWidgets COMPONENTS gl adv html core net base xml QUIET ) -else( APPLE ) +else() find_package( wxWidgets COMPONENTS gl aui adv html core net base xml QUIET ) -endif( APPLE ) +endif() check_find_package_result( wxWidgets_FOUND "wxWidgets" ) diff --git a/Documentation/compiling/build-config.txt b/Documentation/compiling/build-config.txt index b3bb8ba99a..4fb26be37a 100644 --- a/Documentation/compiling/build-config.txt +++ b/Documentation/compiling/build-config.txt @@ -77,7 +77,7 @@ wxWidgets_USE_DEBUG to ON. wxWidgets_USE_UNICODE (ON/OFF) ------------------------------ -If you platform supports Unicode and you wish to build KiCad with Unicode +If your platform supports Unicode and you wish to build KiCad with Unicode support, set wxWidgets_USE_UNICODE to ON. Please note as of the 2.9 branch this option is not required.