From 770c849a31266beeb1b71f390d8119a0504d8ce6 Mon Sep 17 00:00:00 2001 From: David Skoland Date: Tue, 18 Oct 2022 15:16:49 +0200 Subject: [PATCH] wasm: Enable batch tests by default on wasm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Batched tests is the default supported test mode of wasm and should be enabled without explicitly passing a command line argument. Change-Id: I79424384e4e8ca6f670de1cb056f4713740a584f Reviewed-by: Morten Johan Sørvig --- cmake/QtSetup.cmake | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake index a523e2cc2c6..5fc6ed8d98e 100644 --- a/cmake/QtSetup.cmake +++ b/cmake/QtSetup.cmake @@ -225,10 +225,20 @@ if(QT_BUILD_STANDALONE_TESTS) endif() set(BUILD_TESTING ${QT_BUILD_TESTS} CACHE INTERNAL "") -set(_qt_batch_tests OFF) -if(INPUT_batch_tests) +if (WASM) set(_qt_batch_tests ON) +else() + set(_qt_batch_tests OFF) endif() + +if(DEFINED INPUT_batch_tests) + if (${INPUT_batch_tests}) + set(_qt_batch_tests ON) + else() + set(_qt_batch_tests OFF) + endif() +endif() + option(QT_BUILD_TESTS_BATCHED "Link all tests into a single binary." ${_qt_batch_tests}) if(QT_BUILD_TESTS AND QT_BUILD_TESTS_BATCHED AND CMAKE_VERSION VERSION_LESS "3.18")