changeset 3493:c465c6ee2bfb

merge
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 19 Aug 2019 10:18:04 +0200
parents cfaa9eded17e (diff) 22bdb9c91ebf (current diff)
children e0e9df6e5c92
files
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/Compiler.cmake	Fri Aug 16 14:38:15 2019 +0200
+++ b/Resources/CMake/Compiler.cmake	Mon Aug 19 10:18:04 2019 +0200
@@ -193,7 +193,11 @@
   # zero (and similar conditions like integer overflows) are
   # encountered: The "clamp" mode avoids throwing errors, as they
   # cannot be properly catched by "try {} catch (...)" constructions.
-  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]' -s BINARYEN_TRAP_MODE='\"clamp\"'")
+  if (EMSCRIPTEN_SET_LLVM_WASM_BACKEND)
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'")
+  else()
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]' -s BINARYEN_TRAP_MODE='\"clamp\"'")
+  endif()
 
 elseif (CMAKE_SYSTEM_NAME STREQUAL "Android")
 
--- a/Resources/CMake/OrthancFrameworkParameters.cmake	Fri Aug 16 14:38:15 2019 +0200
+++ b/Resources/CMake/OrthancFrameworkParameters.cmake	Mon Aug 19 10:18:04 2019 +0200
@@ -72,6 +72,7 @@
 set(USE_LEGACY_JSONCPP OFF CACHE BOOL "Use the old branch 0.x.y of JsonCpp, that does not require a C++11 compiler (for LSB and old versions of Visual Studio)")
 set(USE_LEGACY_LIBICU OFF CACHE BOOL "Use icu icu4c-58_2, latest version not requiring a C++11 compiler (for LSB and old versions of Visual Studio)")
 set(MSVC_MULTIPLE_PROCESSES OFF CACHE BOOL "Add the /MP option to build with multiple processes if using Visual Studio")
+set(EMSCRIPTEN_SET_LLVM_WASM_BACKEND OFF CACHE BOOL "Sets the compiler flags required to use the LLVM Web Assembly backend in emscripten")
 
 mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE)
 mark_as_advanced(SYSTEM_MONGOOSE_USE_CALLBACKS)