changeset 1917:9c52c0376ad7

improved definition of -Wno-unused-command-line-argument
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 Mar 2022 10:29:47 +0100
parents bd527bbc34df
children fc6009c43bd9
files Applications/StoneWebViewer/WebAssembly/CMakeLists.txt OrthancStone/Resources/Orthanc/CMake/EmscriptenParameters.cmake
diffstat 2 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebAssembly/CMakeLists.txt	Sun Mar 20 18:23:39 2022 +0100
+++ b/Applications/StoneWebViewer/WebAssembly/CMakeLists.txt	Mon Mar 21 10:29:47 2022 +0100
@@ -31,12 +31,7 @@
 # ---------------------------------------------------------------
 set(USE_WASM ON CACHE BOOL "")
 
-# "-Wno-unused-command-line-argument" is used to avoid annoying
-# warnings about setting WASM, FETCH and ASSERTIONS, which was
-# required for earlier versions of emsdk:
-# https://groups.google.com/g/emscripten-discuss/c/VX4enWfadUE
-set(WASM_FLAGS "${WASM_FLAGS} -s WASM=1 -s FETCH=1 -s ASSERTIONS=1 -s DISABLE_EXCEPTION_CATCHING=0 -Wno-unused-command-line-argument")
-
+set(WASM_FLAGS "${WASM_FLAGS} -s WASM=1 -s FETCH=1 -s ASSERTIONS=1 -s DISABLE_EXCEPTION_CATCHING=0")
 if (CMAKE_BUILD_TYPE STREQUAL "Debug")
   set(WASM_FLAGS "${WASM_FLAGS} -s SAFE_HEAP=1")
 endif()
--- a/OrthancStone/Resources/Orthanc/CMake/EmscriptenParameters.cmake	Sun Mar 20 18:23:39 2022 +0100
+++ b/OrthancStone/Resources/Orthanc/CMake/EmscriptenParameters.cmake	Mon Mar 21 10:29:47 2022 +0100
@@ -29,6 +29,13 @@
 # setting it inside "WASM_FLAGS" creates link errors, at least with
 # side modules. TODO: Understand why
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0")
+
+# "-Wno-unused-command-line-argument" is used to avoid annoying
+# warnings about setting WASM, FETCH and ASSERTIONS, which was
+# required for earlier versions of emsdk:
+# https://groups.google.com/g/emscripten-discuss/c/VX4enWfadUE
+set(WASM_FLAGS "${WASM_FLAGS} -Wno-unused-command-line-argument")
+
 #set(WASM_FLAGS "${WASM_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0")
 
 if (EMSCRIPTEN_TARGET_MODE STREQUAL "wasm")