From 96f95fefc1e087de1351c4654617fe5f4967173b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 11 Sep 2024 20:08:21 +0200 Subject: [PATCH] doc: don't let Doxygen see Platform::WindowlessApplication. This name isn't known to it at the time it parses the header (because no such header gets included for it), which in turn causes Doxygen 1.12 to generate a dummy ::Platform namespace. Which then gets a priority over Magnum::Platform when linked to, and because it's dummy, it's reported as an error because it's not allowed to link to undocumented stuff. --- src/Magnum/GL/OpenGLTester.h | 2 ++ src/Magnum/Platform/gl-info.cpp | 2 ++ src/Magnum/Text/fontconverter.cpp | 2 ++ src/Magnum/TextureTools/distancefieldconverter.cpp | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/Magnum/GL/OpenGLTester.h b/src/Magnum/GL/OpenGLTester.h index 3445afee9..9382db46e 100644 --- a/src/Magnum/GL/OpenGLTester.h +++ b/src/Magnum/GL/OpenGLTester.h @@ -304,10 +304,12 @@ class OpenGLTester: public TestSuite::Tester { void gpuTimeBenchmarkBegin(); std::uint64_t gpuTimeBenchmarkEnd(); + #ifndef DOXYGEN_GENERATING_OUTPUT struct WindowlessApplication: Platform::WindowlessApplication { explicit WindowlessApplication(const Arguments& arguments): Platform::WindowlessApplication{arguments} {} int exec() override final { return 0; } } _windowlessApplication; + #endif TimeQuery _gpuTimeQuery{NoCreate}; }; diff --git a/src/Magnum/Platform/gl-info.cpp b/src/Magnum/Platform/gl-info.cpp index 08e4e19db..5b9197c30 100644 --- a/src/Magnum/Platform/gl-info.cpp +++ b/src/Magnum/Platform/gl-info.cpp @@ -200,6 +200,7 @@ Vendor extension support: for more information. */ +#ifndef DOXYGEN_GENERATING_OUTPUT class MagnumInfo: public Platform::WindowlessApplication { public: explicit MagnumInfo(const Arguments& arguments); @@ -873,6 +874,7 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat #undef _l #undef _h } +#endif } diff --git a/src/Magnum/Text/fontconverter.cpp b/src/Magnum/Text/fontconverter.cpp index 08ded5d9d..56c9a546a 100644 --- a/src/Magnum/Text/fontconverter.cpp +++ b/src/Magnum/Text/fontconverter.cpp @@ -125,6 +125,7 @@ The resulting font files can be then used as specified in the documentation of namespace Text { +#ifndef DOXYGEN_GENERATING_OUTPUT class FontConverter: public Platform::WindowlessApplication { public: explicit FontConverter(const Arguments& arguments); @@ -228,6 +229,7 @@ int FontConverter::exec() { return 0; } +#endif } diff --git a/src/Magnum/TextureTools/distancefieldconverter.cpp b/src/Magnum/TextureTools/distancefieldconverter.cpp index c7dbb1703..e8a4beb86 100644 --- a/src/Magnum/TextureTools/distancefieldconverter.cpp +++ b/src/Magnum/TextureTools/distancefieldconverter.cpp @@ -131,6 +131,7 @@ multiple of 2. namespace TextureTools { +#ifndef DOXYGEN_GENERATING_OUTPUT class DistanceFieldConverter: public Platform::WindowlessApplication { public: explicit DistanceFieldConverter(const Arguments& arguments); @@ -250,6 +251,7 @@ int DistanceFieldConverter::exec() { return 0; } +#endif }}