Mercurial > hg > orthanc
diff Resources/CMake/Compiler.cmake @ 3492:cfaa9eded17e
Added flag to control the emscripten backend (which, in turn, tweaks the compiler flags)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 19 Aug 2019 10:17:01 +0200 |
parents | cbbe0bb80bd4 |
children | 589238dcd782 |
line wrap: on
line diff
--- a/Resources/CMake/Compiler.cmake Sat Aug 10 13:42:38 2019 +0200 +++ b/Resources/CMake/Compiler.cmake Mon Aug 19 10:17:01 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")