diff options
Diffstat (limited to 'tests/auto/corelib/global/qlogging/CMakeLists.txt')
-rw-r--r-- | tests/auto/corelib/global/qlogging/CMakeLists.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt new file mode 100644 index 0000000000..bd0ab6aeca --- /dev/null +++ b/tests/auto/corelib/global/qlogging/CMakeLists.txt @@ -0,0 +1,25 @@ +if(NOT WINRT) + add_qt_executable(qlogging_helper + NO_INSTALL # special case + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + SOURCES app/main.cpp + DEFINES QT_MESSAGELOGCONTEXT + LIBRARIES Qt::Core) + + #special case begin + # Fixes required for the backtrace stack to be correct + if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") + target_link_options(qlogging_helper PRIVATE -rdynamic) + endif() + set_target_properties(qlogging_helper PROPERTIES CXX_VISIBILITY_PRESET default) + # special case end +endif() + +add_qt_test(tst_qlogging SOURCES tst_qlogging.cpp + DEFINES + QT_MESSAGELOGCONTEXT + QT_DISABLE_DEPRECATED_BEFORE=0 + HELPER_BINARY="${CMAKE_CURRENT_BINARY_DIR}/qlogging_helper" # special case +) + +target_compile_definitions(tst_qlogging PRIVATE QT_CMAKE_BUILD) # special case # to fix the binary name |