CMake: Mark benchmark executables with a property

This will be used in a follow up patch to identify them.

Pick-to: 6.8
Task-number: QTBUG-93625
Task-number: QTBUG-112212
Change-Id: I39d5eb9f79ac67af0808efeda4d7f4e0a6908cc9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
Alexandru Croitor 2024-10-23 17:19:00 +02:00
parent a72dacce21
commit df040fb111
3 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,7 @@ function(qt_internal_add_executable name)
set_target_properties(${name} PROPERTIES
_qt_is_test_executable ${arg_QT_TEST}
_qt_is_manual_test ${arg_QT_MANUAL_TEST}
_qt_is_benchmark_test ${arg_QT_BENCHMARK_TEST}
)
if(ANDROID)

View File

@ -446,6 +446,7 @@ macro(qt_internal_setup_default_target_function_options)
QT_APP
QT_TEST
QT_MANUAL_TEST
QT_BENCHMARK_TEST
NO_UNITY_BUILD
${__qt_internal_sbom_optional_args}
)

View File

@ -41,6 +41,7 @@ function(qt_internal_add_benchmark target)
qt_internal_add_executable(${target}
NO_INSTALL # we don't install benchmarks
NO_UNITY_BUILD # excluded by default
QT_BENCHMARK_TEST
OUTPUT_DIRECTORY "${arg_OUTPUT_DIRECTORY}" # avoid polluting bin directory
${exec_args}
)