Parcourir la source

Add '--emrun' to general linker flag var instead of just for debug.

Yao Wei Tjong 姚伟忠 il y a 10 ans
Parent
commit
693aeb97a8
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      CMake/Modules/Urho3D-CMake-common.cmake

+ 1 - 1
CMake/Modules/Urho3D-CMake-common.cmake

@@ -823,7 +823,7 @@ macro (setup_emscripten_linker_flags LINKER_FLAGS)
         set (${LINKER_FLAGS}_DEBUG -g4)     # Preserve LLVM debug information, show line number debug comments, and generate source maps
         set (${LINKER_FLAGS}_DEBUG -g4)     # Preserve LLVM debug information, show line number debug comments, and generate source maps
     endif ()
     endif ()
     if (URHO3D_TESTING)
     if (URHO3D_TESTING)
-        set (${LINKER_FLAGS}_DEBUG --emrun) # Inject code into the generated Module object to enable capture of stdout, stderr and exit()
+        set (${LINKER_FLAGS} "${${LINKER_FLAGS}} --emrun")  # Inject code into the generated Module object to enable capture of stdout, stderr and exit()
     endif ()
     endif ()
     # Pass additional source files to linker with the supported flags, such as: js-library, pre-js, post-js, embed-file, preload-file, shell-file
     # Pass additional source files to linker with the supported flags, such as: js-library, pre-js, post-js, embed-file, preload-file, shell-file
     foreach (FILE ${SOURCE_FILES})
     foreach (FILE ${SOURCE_FILES})