diff options
Diffstat (limited to 'tests/auto/corelib/global/qlogging/CMakeLists.txt')
-rw-r--r-- | tests/auto/corelib/global/qlogging/CMakeLists.txt | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt index 47ee7adca0..f35c9c4192 100644 --- a/tests/auto/corelib/global/qlogging/CMakeLists.txt +++ b/tests/auto/corelib/global/qlogging/CMakeLists.txt @@ -1,32 +1,33 @@ -# Generated from qlogging.pro. -# This file is almost completely custom written # special case +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qlogging LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() qt_internal_add_executable(qlogging_helper - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + NO_INSTALL + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 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" AND NOT MINGW) target_link_options(qlogging_helper PRIVATE -rdynamic) endif() set_target_properties(qlogging_helper PROPERTIES CXX_VISIBILITY_PRESET default) -# special case end qt_internal_add_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 +add_dependencies(tst_qlogging qlogging_helper) qt_internal_add_test(tst_qmessagelogger SOURCES tst_qmessagelogger.cpp DEFINES QT_MESSAGELOGCONTEXT - QT_DISABLE_DEPRECATED_BEFORE=0 ) |