diff options
Diffstat (limited to 'tests/manual/wasm/eventloop/eventloop_auto/CMakeLists.txt')
-rw-r--r-- | tests/manual/wasm/eventloop/eventloop_auto/CMakeLists.txt | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/manual/wasm/eventloop/eventloop_auto/CMakeLists.txt b/tests/manual/wasm/eventloop/eventloop_auto/CMakeLists.txt new file mode 100644 index 0000000000..88ddfac4c8 --- /dev/null +++ b/tests/manual/wasm/eventloop/eventloop_auto/CMakeLists.txt @@ -0,0 +1,45 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause +include_directories(../../qtwasmtestlib/) + +# default buid +qt_internal_add_manual_test(eventloop_auto + SOURCES + main.cpp + ../../qtwasmtestlib/qtwasmtestlib.cpp + LIBRARIES + Qt::Core + Qt::CorePrivate +) + +add_custom_command( + TARGET eventloop_auto POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/eventloop_auto.html + ${CMAKE_CURRENT_BINARY_DIR}/eventloop_auto.html) + +add_custom_command( + TARGET eventloop_auto POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/../../qtwasmtestlib/qtwasmtestlib.js + ${CMAKE_CURRENT_BINARY_DIR}/qtwasmtestlib.js) + +# asyncify enabled build +qt_internal_add_manual_test(eventloop_auto_asyncify + SOURCES + main.cpp + ../../qtwasmtestlib/qtwasmtestlib.cpp + LIBRARIES + Qt::Core + Qt::CorePrivate +) + +target_link_options(eventloop_auto_asyncify PRIVATE -sASYNCIFY -Os) + +add_custom_command( + TARGET eventloop_auto_asyncify POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/eventloop_auto_asyncify.html + ${CMAKE_CURRENT_BINARY_DIR}/eventloop_auto_asyncify.html) + + |