Skip to content

Commit

Permalink
improve Wx GCC ABI check #142
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rkitover committed Sep 3, 2017
1 parent 4b1c9b4 commit b1937fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wx/CMakeLists.txt
Expand Up @@ -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})
Expand Down Expand Up @@ -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 "<FLAGS>" "<FLAGS> -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}")
Expand Down

0 comments on commit b1937fe

Please sign in to comment.