From 53ce513f1ca25d55c6a6552b01c13c6b41c41b8f Mon Sep 17 00:00:00 2001 From: fwcd Date: Thu, 7 Mar 2024 02:22:11 +0100 Subject: [PATCH 1/2] CMakeLists: Add WASM_ASSERTIONS option --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f40833ba72e..e1825c023ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2802,6 +2802,13 @@ if(DEBUG_ASSERTIONS_FATAL) endif() endif() +if(EMSCRIPTEN) + cmake_dependent_option(WASM_ASSERTIONS "Enable additional checks when targeting Emscripten/WebAssembly" ON "DEBUG_ASSERTIONS_FATAL OR CMAKE_BUILD_TYPE STREQUAL Debug" OFF) + if(WASM_ASSERTIONS) + target_link_options(mixxx-lib PUBLIC -sASSERTIONS) + endif() +endif() + target_compile_definitions(mixxx-lib PUBLIC QT_TABLET_SUPPORT QT_USE_QSTRINGBUILDER) is_static_library(Qt_IS_STATIC Qt${QT_VERSION_MAJOR}::Core) if(Qt_IS_STATIC) From 9e47cb3cc33710d793cc3067326cf5d3f5a374dd Mon Sep 17 00:00:00 2001 From: fwcd Date: Fri, 8 Mar 2024 18:46:49 +0100 Subject: [PATCH 2/2] CMakeLists: Default `WASM_ASSERTIONS` to off See https://forum.qt.io/topic/155159/cannot-have-multiple-async-operations-in-flight-at-once-during-qapplication-initialization --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1825c023ae..2de62e944b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2803,7 +2803,7 @@ if(DEBUG_ASSERTIONS_FATAL) endif() if(EMSCRIPTEN) - cmake_dependent_option(WASM_ASSERTIONS "Enable additional checks when targeting Emscripten/WebAssembly" ON "DEBUG_ASSERTIONS_FATAL OR CMAKE_BUILD_TYPE STREQUAL Debug" OFF) + option(WASM_ASSERTIONS "Enable additional checks when targeting Emscripten/WebAssembly" OFF) if(WASM_ASSERTIONS) target_link_options(mixxx-lib PUBLIC -sASSERTIONS) endif()