diff OrthancStone/Resources/WebAssemblyUnitTests/CMakeLists.txt @ 2081:3ef91da06636

fix compatibility with Emscripten 3.1.47
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 11 Oct 2023 16:38:38 +0200
parents 07964689cb0b
children a6d5373e471c 352cb0fa57b2
line wrap: on
line diff
--- a/OrthancStone/Resources/WebAssemblyUnitTests/CMakeLists.txt	Mon Aug 14 10:36:35 2023 +0200
+++ b/OrthancStone/Resources/WebAssemblyUnitTests/CMakeLists.txt	Wed Oct 11 16:38:38 2023 +0200
@@ -39,7 +39,7 @@
   set(WASM_FLAGS "${WASM_FLAGS} -s SAFE_HEAP=1")
 endif()
 
-set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'")
+set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'")
 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ERROR_ON_UNDEFINED_SYMBOLS=1")
 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_MEMORY=268435456")  # 256MB + resize
 set(WASM_LINKER_FLAGS "${WASM_LINKER_FLAGS} -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1")
@@ -55,11 +55,12 @@
 
 include(${CMAKE_SOURCE_DIR}/../CMake/OrthancStoneWebAssemblyParameters.cmake)
 
-SET(ENABLE_DCMTK ON)  # Necessary for the tests of the Orthanc framework
-SET(ENABLE_PUGIXML ON)  # Necessary for the tests of the Orthanc framework
+SET(ENABLE_DCMTK ON)   # Necessary for the tests of the Orthanc framework
 SET(ENABLE_GOOGLE_TEST OFF)
 SET(ENABLE_LOCALE ON)  # Necessary for text rendering
-SET(ENABLE_LUA ON)  # Necessary for the tests of the Orthanc framework
+SET(ENABLE_LUA ON)     # Necessary for the tests of the Orthanc framework
+SET(ENABLE_MODULE_JOBS OFF)
+SET(ENABLE_PUGIXML ON) # Necessary for the tests of the Orthanc framework
 SET(ORTHANC_SANDBOXED ON)
 
 # this will set up the build system for Stone of Orthanc and will
@@ -118,6 +119,9 @@
   ${ORTHANC_STONE_SOURCES}
   )
 
+# Boost::Math begs for -std=c++14 since Boost 1.82.0
+set_property(TARGET UnitTests PROPERTY CXX_STANDARD 14)
+
 DefineSourceBasenameForTarget(UnitTests)