Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
3490:786fce009be8 | 3492:cfaa9eded17e |
---|---|
191 | 191 |
192 # The BINARYEN_TRAP_MODE specifies what to do when divisions per | 192 # The BINARYEN_TRAP_MODE specifies what to do when divisions per |
193 # zero (and similar conditions like integer overflows) are | 193 # zero (and similar conditions like integer overflows) are |
194 # encountered: The "clamp" mode avoids throwing errors, as they | 194 # encountered: The "clamp" mode avoids throwing errors, as they |
195 # cannot be properly catched by "try {} catch (...)" constructions. | 195 # cannot be properly catched by "try {} catch (...)" constructions. |
196 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]' -s BINARYEN_TRAP_MODE='\"clamp\"'") | 196 if (EMSCRIPTEN_SET_LLVM_WASM_BACKEND) |
197 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'") | |
198 else() | |
199 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]' -s BINARYEN_TRAP_MODE='\"clamp\"'") | |
200 endif() | |
197 | 201 |
198 elseif (CMAKE_SYSTEM_NAME STREQUAL "Android") | 202 elseif (CMAKE_SYSTEM_NAME STREQUAL "Android") |
199 | 203 |
200 else() | 204 else() |
201 message("Unknown target platform: ${CMAKE_SYSTEM_NAME}") | 205 message("Unknown target platform: ${CMAKE_SYSTEM_NAME}") |