diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2020-12-03 19:13:08 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-12-07 19:27:05 +0000 |
commit | acfe198d08a45854e8edf1b1fadacec58ce6e075 (patch) | |
tree | 2b4e8d81777db7296abdb15b1a6e4b077772d2d7 /qt_cmdline.cmake | |
parent | 01474c31ba2a3ca225cbc2440bd0ee28458b2a26 (diff) |
CMake: Add extra targets to run single benchmark using CMake generator
Add custom targets with '_benchmark' suffixes to make run of
benchmarks using generators possible, e.g.:
$ ninja tst_bench_qudpsocket_benchmark
Extend '-[no]make' option to pass benchmark. Rework
'-[no]make' processing to unify these options processing.
Also looks like it doesn't make sense to enable benchmarks without
having test enabled. So '-DQT_BUILD_BENCHMARKS' enables test as own
dependency automatically.
Task-number: QTBUG-89076
Change-Id: Ieee9eadaf6d75a1efec120242d6eb786ace1b071
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 61d5b019727dd1c06366205cb307a2a928a2a29c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'qt_cmdline.cmake')
-rw-r--r-- | qt_cmdline.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qt_cmdline.cmake b/qt_cmdline.cmake index ee580bd930..0145cd4a14 100644 --- a/qt_cmdline.cmake +++ b/qt_cmdline.cmake @@ -71,12 +71,15 @@ qt_commandline_option(incredibuild-xge TYPE boolean NAME incredibuild_xge) qt_commandline_option(libudev TYPE boolean) qt_commandline_option(linker TYPE optionalString VALUES bfd gold lld) qt_commandline_option(ltcg TYPE boolean) -qt_commandline_option(make TYPE addString VALUES examples libs tests tools) +# special case begin +qt_commandline_option(make TYPE addString VALUES examples libs tests tools + benchmarks) +# special case end qt_commandline_option(make-tool TYPE string) qt_commandline_option(mips_dsp TYPE boolean) qt_commandline_option(mips_dspr2 TYPE boolean) qt_commandline_option(mp TYPE boolean NAME msvc_mp) -qt_commandline_option(nomake TYPE addString VALUES examples tests tools) +qt_commandline_option(nomake TYPE addString VALUES examples tests tools benchmarks) # special case qt_commandline_option(opensource TYPE void NAME commercial VALUE no) qt_commandline_option(optimize-debug TYPE boolean NAME optimize_debug) qt_commandline_option(optimize-size TYPE boolean NAME optimize_size) |