# HG changeset patch # User Sebastien Jodogne # Date 1604999405 -3600 # Node ID 9a4c09361f3e3fd72036daa35b70dde2b5f94583 # Parent 960bb5fcc4406f7779e13e23c251c29d30869b7a removed annoying warning diff -r 960bb5fcc440 -r 9a4c09361f3e Applications/StoneWebViewer/WebAssembly/ParseWebAssemblyExports.py --- 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) diff -r 960bb5fcc440 -r 9a4c09361f3e Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp --- 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 -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,