Skip to content

Commit

Permalink
Emscripten: Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghabry committed Dec 20, 2023
1 parent 540b9c9 commit 588dc3e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,10 @@ if(PLAYER_ENABLE_TESTS)
if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
target_compile_definitions(test_runner_player PUBLIC EP_NATIVE_TEST_PATH=\"${CMAKE_CURRENT_SOURCE_DIR}/tests/assets\")
target_compile_definitions(test_runner_player PUBLIC EP_TEST_PATH=\"/assets\")
target_compile_definitions(test_runner_player PUBLIC DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS=1)

target_link_libraries(test_runner_player "nodefs.js")
set_property(TARGET test_runner_player PROPERTY LINK_FLAGS "-sALLOW_MEMORY_GROWTH --bind")
else()
target_compile_definitions(test_runner_player PUBLIC EP_TEST_PATH=\"${CMAKE_CURRENT_SOURCE_DIR}/tests/assets\")
endif()
Expand All @@ -1438,10 +1441,6 @@ if(PLAYER_ENABLE_TESTS)
endif()
add_dependencies(check_player test_runner_player)
add_dependencies(check check_player)

if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
set_property(TARGET test_runner_player APPEND_STRING PROPERTY LINK_FLAGS "-s ALLOW_MEMORY_GROWTH")
endif()
endif()

# Instrumentation framework
Expand Down

0 comments on commit 588dc3e

Please sign in to comment.