From b1937fe9cbc9813857887ef3a6c67cb0c8eab65a Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Sat, 2 Sep 2017 18:52:01 -0700 Subject: [PATCH] improve Wx GCC ABI check #142 Start checking the ABI version at -fabi-version=0, which is the default, and if that succeeds don't set the flag at all. This will allow the code to work properly if and when Wx removes the ABI check alltogether. --- src/wx/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt index e13ad026..5cf4b7ed 100644 --- a/src/wx/CMakeLists.txt +++ b/src/wx/CMakeLists.txt @@ -111,7 +111,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX) INCLUDE(CheckCXXSourceRuns) UNSET(WX_ABI_MATCHES) - SET(WX_ABI_VERSION 1) + SET(WX_ABI_VERSION 0) SET(CURRENT_DEFS ${CMAKE_REQUIRED_DEFINITIONS}) SET(CURRENT_LIBS ${CMAKE_REQUIRED_LIBRARIES}) @@ -149,7 +149,7 @@ wxIMPLEMENT_APP(MyApp); SET(CMAKE_REQUIRED_DEFINITIONS ${CURRENT_DEFS}) SET(CMAKE_REQUIRED_LIBRARIES ${CURRENT_LIBS}) - IF(${${WX_ABI_VAR}}) + IF(${${WX_ABI_VAR}} AND (NOT WX_ABI_VERSION EQUAL 0)) # add C++ flags STRING(REGEX REPLACE "" " -fabi-version=${WX_ABI_VERSION} " CMAKE_CXX_COMPILE_OBJECT ${CMAKE_CXX_COMPILE_OBJECT}) SET(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -fabi-version=${WX_ABI_VERSION}")