diff --git a/cmake/QtTestHelpers.cmake b/cmake/QtTestHelpers.cmake index 6cfacc8519e..9ea4b4d669d 100644 --- a/cmake/QtTestHelpers.cmake +++ b/cmake/QtTestHelpers.cmake @@ -217,7 +217,7 @@ function(qt_internal_prepare_test_target_flags version_arg exceptions_text gui_t # Qt modules get compiled without exceptions enabled by default. # However, testcases should be still built with exceptions. set(${exceptions_text} "EXCEPTIONS" PARENT_SCOPE) - if (${arg_NO_EXCEPTIONS}) + if (${arg_NO_EXCEPTIONS} OR WASM) set(${exceptions_text} "" PARENT_SCOPE) endif()