From 9d831491334e75f8ccc691edaeb173af81ab80ac Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Mon, 16 Nov 2020 18:31:56 +0100 Subject: [PATCH] Offer to build manual tests through QT_BUILD_MANUAL_TESTS Disabled by default as they are currently not being built and many are not working properly, this will allow us to start using them again. Change-Id: I823368d04e9fde2beccabedc3ca15efd1f355bfb Pick-to: 6.0 Reviewed-by: Alexandru Croitor --- cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 4 ++-- cmake/QtSetup.cmake | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index d9e4eb85ef8..53c70533fb7 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -455,8 +455,8 @@ macro(qt_build_tests) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/CMakeLists.txt" AND QT_BUILD_BENCHMARKS) add_subdirectory(benchmarks) endif() - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/manual/CMakeLists.txt") - # add_subdirectory(manual) don't build manual tests for now, because qmake doesn't. + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/manual/CMakeLists.txt" AND QT_BUILD_MANUAL_TESTS) + add_subdirectory(manual) endif() endmacro() diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake index a77a1795b9d..ec8be5e269f 100644 --- a/cmake/QtSetup.cmake +++ b/cmake/QtSetup.cmake @@ -163,6 +163,8 @@ enable_testing() option(QT_BUILD_EXAMPLES "Build Qt examples" OFF) option(QT_BUILD_EXAMPLES_BY_DEFAULT "Should examples be built as part of the default 'all' target." ON) +option(QT_BUILD_MANUAL_TESTS "Build Qt manual tests" OFF) + ## Find host tools (if non native): set(QT_HOST_PATH "" CACHE PATH "Installed Qt host directory path, used for cross compiling.")