diff options
author | Tim Blechmann <tim@klingt.org> | 2024-02-07 11:25:33 +0800 |
---|---|---|
committer | Tim Blechmann <tim@klingt.org> | 2024-02-08 23:30:29 +0800 |
commit | 25b89f2c88cdfc98bfa462949531a33f7ef50996 (patch) | |
tree | bdf2131aaadd9b77959b2504df47adc6688ee916 /CMakeLists.txt | |
parent | 68179f76053ee042a421dd4a1a27f3fbb185b475 (diff) |
cmake: build repo helpers - fine-grained test/example options
the tests/examples could only be enabled globally. when working on a
specific repo, it's beneficial to disable tests/examples for other
projects to reduce project sizes (and cmake configure/generate times)
Change-Id: I0026ba87b667d427043cc8eb1baa6c28b2046dd7
Pick-to: 6.7
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a0da025418..cf2031bd5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,15 +203,8 @@ endif() qt_build_repo_post_process() -if(QT_BUILD_TESTS) - add_subdirectory(tests) - if(NOT QT_BUILD_TESTS_BY_DEFAULT) - set_property(DIRECTORY tests PROPERTY EXCLUDE_FROM_ALL TRUE) - endif() -endif() +qt_build_repo_impl_tests() qt_build_repo_end() -if(NOT QT_BUILD_STANDALONE_TESTS AND QT_BUILD_EXAMPLES) - add_subdirectory(examples) -endif() +qt_build_repo_impl_examples() |