Mercurial > hg > orthanc-stone
changeset 1632:9a4c09361f3e
removed annoying warning
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 10 Nov 2020 10:10:05 +0100 |
parents | 960bb5fcc440 |
children | 53d378ef7277 |
files | Applications/StoneWebViewer/WebAssembly/ParseWebAssemblyExports.py Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp |
diffstat | 2 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebAssembly/ParseWebAssemblyExports.py Mon Nov 09 18:49:08 2020 +0100 +++ b/Applications/StoneWebViewer/WebAssembly/ParseWebAssemblyExports.py Tue Nov 10 10:10:05 2020 +0100 @@ -59,7 +59,8 @@ # PARSE_SKIP_FUNCTION_BODIES prevents clang from failing because of # undefined types, which prevents compilation of functions tu = index.parse(args.source, - [ '-DEMSCRIPTEN_KEEPALIVE=__attribute__((annotate("WebAssembly")))' ], + [ '-DEMSCRIPTEN_KEEPALIVE=__attribute__((annotate("WebAssembly")))', + '-DSTONE_WEB_VIEWER_EXPORT=__attribute__((annotate("WebAssembly")))'], options = clang.cindex.TranslationUnit.PARSE_SKIP_FUNCTION_BODIES)
--- a/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Mon Nov 09 18:49:08 2020 +0100 +++ b/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Tue Nov 10 10:10:05 2020 +0100 @@ -98,7 +98,13 @@ #include <stdio.h> -enum EMSCRIPTEN_KEEPALIVE ThumbnailType +#if !defined(STONE_WEB_VIEWER_EXPORT) +// We are not running ParseWebAssemblyExports.py, but we're compiling the wasm +# define STONE_WEB_VIEWER_EXPORT +#endif + + +enum STONE_WEB_VIEWER_EXPORT ThumbnailType { ThumbnailType_Image, ThumbnailType_NoPreview, @@ -109,7 +115,7 @@ }; -enum EMSCRIPTEN_KEEPALIVE DisplayedFrameQuality +enum STONE_WEB_VIEWER_EXPORT DisplayedFrameQuality { DisplayedFrameQuality_None, DisplayedFrameQuality_Low, @@ -117,7 +123,7 @@ }; -enum EMSCRIPTEN_KEEPALIVE WebViewerAction +enum STONE_WEB_VIEWER_EXPORT WebViewerAction { WebViewerAction_GrayscaleWindowing, WebViewerAction_Zoom,