Skip to content

Commit d14609f

Browse files
committed
WASM lib: fix compilation with Emscripten
Set C++ standard based on EMSCRIPTEN condition to C++17. Emscripten 4.0.20 introduced a breaking change where Embind now requires C++17 or newer.
1 parent 6c0273f commit d14609f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/slvs/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ endif()
4545

4646
if(EMSCRIPTEN)
4747
add_executable(slvs-wasm jslib.cpp)
48+
target_compile_features(slvs-wasm PRIVATE cxx_std_17)
4849
target_link_libraries(slvs-wasm PRIVATE slvs-interface embind)
4950
target_link_options(slvs-wasm PRIVATE
5051
"SHELL:-s MODULARIZE=1"

0 commit comments

Comments
 (0)