Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

-fno-keep-inline-dllexport only exists in gcc >= 4.6.1

  • Loading branch information...
commit ccaa2ecf3682571f8939f604bb5efb0ca3323d31 1 parent d6a92c3
David Manura davidm authored

Showing 2 changed files with 9 additions and 2 deletions. Show diff stats Hide diff stats

  1. +6 2 CMakeLists.txt
  2. +3 0  cmake/configure.cmake
8 CMakeLists.txt
@@ -13,8 +13,12 @@ include ( configure )
13 13 # 2DO: Use file globs where apropriate to reduce the ridiculous filelists
14 14 # NOTE: We do not follow the recommended wxwidgets naming conventions as it conflicts with our conventions
15 15
16   -# Avoid linking memory issue with gcc (see wxwidgets wiki for details)
17   -set ( CMAKE_CXX_FLAGS "-fno-keep-inline-dllexport" )
  16 +# Avoid leaking memory issue with gcc/mingw.
  17 +# http://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW
  18 +# http://old.nabble.com/MinGW-GCC-4.6.1-released-p32468533.html
  19 +if (HAVE_FNO_KEEP_INLINE_DLLEXPORT)
  20 + set ( CMAKE_CXX_FLAGS "-fno-keep-inline-dllexport" )
  21 +endif ()
18 22
19 23 configure_file ( include/wx/msw/setup.h ${CMAKE_CURRENT_BINARY_DIR}/include/wx/setup.h )
20 24 configure_file ( include/wx/msw/genrcdefs.h ${CMAKE_CURRENT_BINARY_DIR}/include/wx/msw/rcdefs.h )
3  cmake/configure.cmake
... ... @@ -1,4 +1,5 @@
1 1 include ( TestBigEndian )
  2 +include ( CheckCCompilerFlag )
2 3
3 4 test_big_endian ( BIGENDIAN )
4 5 if ( BIGENDIAN )
@@ -30,3 +31,5 @@ if ( NOT HAVE_SYS_TYPES_H )
30 31 set ( OFF_T long )
31 32 set ( SIZE_T ungigned )
32 33 endif ()
  34 +
  35 +check_c_compiler_flag(-fno-keep-inline-dllexport HAVE_FNO_KEEP_INLINE_DLLEXPORT) # gcc >= 4.6.1

0 comments on commit ccaa2ec

Please sign in to comment.
Something went wrong with that request. Please try again.