Skip to content

Commit d9dacd7

Browse files
committed
build(docker): set .threads.wasm target suffix
1 parent f83ec6b commit d9dacd7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/docker/itk-wasm/ITKWebAssemblyInterface.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ function(add_executable target)
4646
# Suppress CLI11 Encoding_inl.hpp std::wstring_convert deprecation warning
4747
# Suppress glaze warning about warning: 'static_assert' with a user-generated message is a C++26 extension [-Wc++26-extensions]
4848
set_property(TARGET ${wasm_target} APPEND PROPERTY COMPILE_OPTIONS -msimd128 -flto -Wno-deprecated-declarations -Wno-c++26-extensions)
49+
set (suffix ".wasm")
50+
if("$ENV{CFLAGS}" MATCHES "thread")
51+
set(suffix ".threads.wasm")
52+
set_property(TARGET ${wasm_target} PROPERTY SUFFIX ${suffix})
53+
endif()
4954
if(EMSCRIPTEN)
5055
set_property(TARGET ${wasm_target} APPEND PROPERTY COMPILE_OPTIONS -Wno-warn-absolute-paths -DITK_WASM_NO_FILESYSTEM_IO)
5156
kebab_to_camel(${target} targetCamel)
@@ -62,7 +67,7 @@ function(add_executable target)
6267
if (NOT ${_is_imported})
6368
add_custom_command(TARGET ${target}
6469
POST_BUILD
65-
COMMAND /usr/bin/zstd -f "$<TARGET_FILE_DIR:${target}>/$<TARGET_FILE_BASE_NAME:${target}>.wasm" -o "$<TARGET_FILE_DIR:${target}>/$<TARGET_FILE_BASE_NAME:${target}>.wasm.zst"
70+
COMMAND /usr/bin/zstd -f "$<TARGET_FILE_DIR:${target}>/$<TARGET_FILE_BASE_NAME:${target}>${suffix}" -o "$<TARGET_FILE_DIR:${target}>/$<TARGET_FILE_BASE_NAME:${target}>${suffix}.zst"
6671
)
6772
endif()
6873
else()

0 commit comments

Comments
 (0)