CMake: Fix build of qlogging test on MinGW

The linker doesn't have a -rdynamic option. Otherwise the build
fails with
g++.exe error unrecognized command line option '-rdynamic'

Task-number: QTBUG-75578
Change-Id: Ie89a19fd25e90bef14e64d1d98fd973fa0315997
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
bb10
Alexandru Croitor 2020-04-28 19:31:51 +02:00
parent 39090ea15c
commit 49212cb55a
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ if(NOT WINRT)
#special case begin
# Fixes required for the backtrace stack to be correct
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" AND NOT MINGW)
target_link_options(qlogging_helper PRIVATE -rdynamic)
endif()
set_target_properties(qlogging_helper PROPERTIES CXX_VISIBILITY_PRESET default)