diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2022-01-31 18:53:57 +0100 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2022-02-02 16:45:37 +0100 |
commit | fd3341a74ecbe93c5fb931f625075b93be69b9de (patch) | |
tree | dd0df47448e832b524c91b945bfcc890607a9730 /cmake/QtTestHelpers.cmake | |
parent | 1b34ee080e0b336233d2be8422c4476569251da6 (diff) |
Add qt_internal_undefine_global_definition function
qt_internal_undefine_global_definition disables an internal global
definition that is defined by the qt_internal_add_global_definition
function for a specific target.
Remove the ability to set the custom "undefine" flag for the
definitions since it's hard to control it using the introduced
function.
Pick-to: 6.2 6.3
Task-number: QTBUG-100334
Change-Id: Ic1637d97aa51bbdd06c5b191c57a941aa208d4dc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'cmake/QtTestHelpers.cmake')
-rw-r--r-- | cmake/QtTestHelpers.cmake | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cmake/QtTestHelpers.cmake b/cmake/QtTestHelpers.cmake index 52d0e619bb..70bca2267e 100644 --- a/cmake/QtTestHelpers.cmake +++ b/cmake/QtTestHelpers.cmake @@ -34,8 +34,7 @@ function(qt_internal_add_benchmark target) ) # Disable the QT_NO_NARROWING_CONVERSIONS_IN_CONNECT define for benchmarks - set_target_properties(${target} PROPERTIES - QT_INTERNAL_UNDEF_QT_NO_NARROWING_CONVERSIONS_IN_CONNECT TRUE) + qt_internal_undefine_global_definition(${target} QT_NO_NARROWING_CONVERSIONS_IN_CONNECT) qt_internal_collect_command_environment(benchmark_env_path benchmark_env_plugin_path) @@ -97,8 +96,7 @@ function(qt_internal_add_manual_test target) ) # Disable the QT_NO_NARROWING_CONVERSIONS_IN_CONNECT define for manual tests - set_target_properties(${target} PROPERTIES - QT_INTERNAL_UNDEF_QT_NO_NARROWING_CONVERSIONS_IN_CONNECT TRUE) + qt_internal_undefine_global_definition(${target} QT_NO_NARROWING_CONVERSIONS_IN_CONNECT) endfunction() @@ -240,8 +238,7 @@ function(qt_internal_add_test name) ) # Disable the QT_NO_NARROWING_CONVERSIONS_IN_CONNECT define for tests - set_target_properties(${name} PROPERTIES - QT_INTERNAL_UNDEF_QT_NO_NARROWING_CONVERSIONS_IN_CONNECT TRUE) + qt_internal_undefine_global_definition(${name} QT_NO_NARROWING_CONVERSIONS_IN_CONNECT) # Tests should not be bundles on macOS even if arg_GUI is true, because some tests make # assumptions about the location of helper processes, and those paths would be different @@ -631,8 +628,7 @@ function(qt_internal_add_test_helper name) qt_internal_add_executable("${name}" NO_INSTALL ${extra_args_to_pass} ${forward_args}) # Disable the QT_NO_NARROWING_CONVERSIONS_IN_CONNECT define for test helpers - set_target_properties(${name} PROPERTIES - QT_INTERNAL_UNDEF_QT_NO_NARROWING_CONVERSIONS_IN_CONNECT TRUE) + qt_internal_undefine_global_definition(${name} QT_NO_NARROWING_CONVERSIONS_IN_CONNECT) endfunction() |