Skip to content

Commit ddca6c6

Browse files
committed
Propagate wasm JIT mode defines to Emscripten test targets
1 parent 2914f5a commit ddca6c6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ foreach(test_src IN LISTS MINIEXPR_TEST_SOURCES)
3434
PRIVATE ME_DSL_JIT_TEST_STUB_SO_PATH="$<TARGET_FILE:me_jit_test_stub>")
3535
target_link_libraries("${test_name}" PRIVATE ${MINIEXPR_DEFAULT_LIB} ${MINIEXPR_THREADS_LIB})
3636
if(EMSCRIPTEN)
37+
if(MINIEXPR_USE_WASM32_JIT)
38+
target_compile_definitions("${test_name}" PRIVATE ME_USE_WASM32_JIT=1)
39+
if(MINIEXPR_WASM32_SIDE_MODULE)
40+
target_compile_definitions("${test_name}" PRIVATE ME_WASM32_SIDE_MODULE=1)
41+
else()
42+
target_compile_definitions("${test_name}" PRIVATE ME_WASM32_SIDE_MODULE=0)
43+
endif()
44+
endif()
3745
target_link_options("${test_name}" PRIVATE
3846
"-sALLOW_MEMORY_GROWTH=1"
3947
"-sINITIAL_MEMORY=134217728")

0 commit comments

Comments
 (0)