diff options
author | Mikolaj Boc <mikolaj.boc@qt.io> | 2023-01-05 14:55:20 +0100 |
---|---|---|
committer | Mikolaj Boc <mikolaj.boc@qt.io> | 2023-01-06 12:37:35 +0100 |
commit | 5c98ffdfefd32cc8495a85db10d1231ddcb7e9e0 (patch) | |
tree | 75923af6666d790bf0b425747389ccc03d605c5d /cmake/QtTestHelpers.cmake | |
parent | fdeaf3054c93c9ead8d6f0f4539858ab025b20ce (diff) | |
download | qtbase-5c98ffdfefd32cc8495a85db10d1231ddcb7e9e0.tar.gz |
Only set the deprecation define once for test batch
Change-Id: I215f7a0dbb0078be9fdeadb1f941304071a575fa
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtTestHelpers.cmake')
-rw-r--r-- | cmake/QtTestHelpers.cmake | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cmake/QtTestHelpers.cmake b/cmake/QtTestHelpers.cmake index c98723e237..fbda0f5ce2 100644 --- a/cmake/QtTestHelpers.cmake +++ b/cmake/QtTestHelpers.cmake @@ -284,6 +284,7 @@ function(qt_internal_add_test_to_batch batch_name name) # Lazy-init the test batch if(NOT TARGET ${target}) + qt_internal_library_deprecation_level(deprecation_define) qt_internal_add_executable(${target} ${exceptions_text} ${gui_text} @@ -291,7 +292,7 @@ function(qt_internal_add_test_to_batch batch_name name) NO_INSTALL OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/build_dir" SOURCES "${QT_CMAKE_DIR}/qbatchedtestrunner.in.cpp" - DEFINES QTEST_BATCH_TESTS + DEFINES QTEST_BATCH_TESTS ${deprecation_define} INCLUDE_DIRECTORIES ${private_includes} LIBRARIES ${QT_CMAKE_EXPORT_NAMESPACE}::Core ${QT_CMAKE_EXPORT_NAMESPACE}::Test @@ -345,8 +346,6 @@ function(qt_internal_add_test_to_batch batch_name name) list(PREPEND batched_test_list ${name}) set_property(GLOBAL PROPERTY _qt_batched_test_list_property ${batched_test_list}) - qt_internal_library_deprecation_level(deprecation_define) - # Merge the current test with the rest of the batch qt_internal_extend_target(${target} INCLUDE_DIRECTORIES ${arg_INCLUDE_DIRECTORIES} @@ -355,7 +354,6 @@ function(qt_internal_add_test_to_batch batch_name name) SOURCES ${arg_SOURCES} DEFINES ${arg_DEFINES} - ${deprecation_define} COMPILE_OPTIONS ${arg_COMPILE_OPTIONS} COMPILE_FLAGS ${arg_COMPILE_FLAGS} LINK_OPTIONS ${arg_LINK_OPTIONS} |