diff --git a/src/Magnum/Math/Angle.h b/src/Magnum/Math/Angle.h index 5b5eb7992..9bc31f899 100644 --- a/src/Magnum/Math/Angle.h +++ b/src/Magnum/Math/Angle.h @@ -334,8 +334,8 @@ template<> struct MAGNUM_EXPORT TweakableParser> parse(Containers::ArrayView value); }; +#endif }} -#endif #endif diff --git a/src/Magnum/Math/Color.h b/src/Magnum/Math/Color.h index b3605c7ea..36a0aebbf 100644 --- a/src/Magnum/Math/Color.h +++ b/src/Magnum/Math/Color.h @@ -1284,6 +1284,7 @@ template struct ConfigurationValue>: Configurat /** @configurationvalue{Magnum::Color4} */ template struct ConfigurationValue>: ConfigurationValue> {}; +#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) /** @tweakableliteral{Magnum::Math::Color3} @@ -1347,6 +1348,7 @@ template<> struct MAGNUM_EXPORT TweakableParser> parse(Containers::ArrayView value); }; +#endif }} diff --git a/src/Magnum/Math/Half.h b/src/Magnum/Math/Half.h index 617ce32a9..f957fd09c 100644 --- a/src/Magnum/Math/Half.h +++ b/src/Magnum/Math/Half.h @@ -163,6 +163,7 @@ MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug }} +#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) namespace Corrade { namespace Utility { /** @@ -178,5 +179,6 @@ template<> struct MAGNUM_EXPORT TweakableParser { }; }} +#endif #endif diff --git a/src/Magnum/Math/Test/AngleTest.cpp b/src/Magnum/Math/Test/AngleTest.cpp index 83e2d4194..c3eff8a93 100644 --- a/src/Magnum/Math/Test/AngleTest.cpp +++ b/src/Magnum/Math/Test/AngleTest.cpp @@ -29,7 +29,9 @@ #include #include #include +#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) #include +#endif #include "Magnum/Math/Angle.h" @@ -51,8 +53,10 @@ struct AngleTest: Corrade::TestSuite::Tester { void debugRad(); void configurationDeg(); void configurationRad(); + #if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) template void tweakable(); template void tweakableError(); + #endif }; typedef Math::Deg Deg; @@ -62,6 +66,7 @@ typedef Math::Rad Radd; using namespace Literals; +#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) namespace { constexpr struct { @@ -111,6 +116,7 @@ template<> struct TweakableTraits { }; } +#endif AngleTest::AngleTest() { addTests({&AngleTest::construct, @@ -127,6 +133,7 @@ AngleTest::AngleTest() { &AngleTest::configurationDeg, &AngleTest::configurationRad}); + #if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) addInstancedTests({ &AngleTest::tweakable, &AngleTest::tweakable, @@ -140,6 +147,7 @@ AngleTest::AngleTest() { &AngleTest::tweakableError, &AngleTest::tweakableError}, Corrade::Containers::arraySize(TweakableErrorData)); + #endif } void AngleTest::construct() { @@ -304,6 +312,7 @@ void AngleTest::configurationRad() { CORRADE_COMPARE(c.value("angle"), angle); } +#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) template void AngleTest::tweakable() { auto&& data = TweakableData[testCaseInstanceId()]; setTestCaseName(Corrade::Utility::formatString("tweakable<{}>", TweakableTraits::name())); @@ -329,6 +338,7 @@ template void AngleTest::tweakableError() { CORRADE_COMPARE(out.str(), Corrade::Utility::formatString(data.error, TweakableTraits::literal())); CORRADE_COMPARE(state, data.state); } +#endif }}} diff --git a/src/Magnum/Math/Test/ColorTest.cpp b/src/Magnum/Math/Test/ColorTest.cpp index d294cacd9..55d9e2eb1 100644 --- a/src/Magnum/Math/Test/ColorTest.cpp +++ b/src/Magnum/Math/Test/ColorTest.cpp @@ -28,7 +28,9 @@ #include #include #include +#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) #include +#endif #include "Magnum/Math/Color.h" @@ -108,6 +110,7 @@ struct ColorTest: Corrade::TestSuite::Tester { void debugUb(); void configuration(); + #if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) void tweakableRgb(); void tweakableSrgb(); void tweakableRgbf(); @@ -125,6 +128,7 @@ struct ColorTest: Corrade::TestSuite::Tester { void tweakableErrorSrgbf(); void tweakableErrorRgbaf(); void tweakableErrorSrgbaf(); + #endif }; typedef Math::Vector3 Vector3; @@ -139,6 +143,7 @@ typedef Math::Deg Deg; using namespace Literals; +#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) namespace { const struct { @@ -174,6 +179,7 @@ constexpr struct { }; } +#endif ColorTest::ColorTest() { addTests({&ColorTest::construct, @@ -216,6 +222,7 @@ ColorTest::ColorTest() { &ColorTest::debugUb, &ColorTest::configuration}); + #if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) addInstancedTests({&ColorTest::tweakableRgb, &ColorTest::tweakableSrgb, &ColorTest::tweakableRgba, @@ -235,6 +242,7 @@ ColorTest::ColorTest() { &ColorTest::tweakableErrorRgbaf, &ColorTest::tweakableErrorSrgbaf}, Corrade::Containers::arraySize(TweakableErrorData)); + #endif } void ColorTest::construct() { @@ -897,6 +905,7 @@ void ColorTest::configuration() { CORRADE_COMPARE(c.value("color4"), color4); } +#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) void ColorTest::tweakableRgb() { auto&& data = TweakableData[testCaseInstanceId()]; setTestCaseDescription(data.name); @@ -1088,6 +1097,7 @@ void ColorTest::tweakableErrorSrgbaf() { CORRADE_COMPARE(out.str(), Corrade::Utility::formatString(data.error, "ff3366aa", "rgbaf", "s")); CORRADE_COMPARE(state, data.state); } +#endif }}} diff --git a/src/Magnum/Math/Test/HalfTest.cpp b/src/Magnum/Math/Test/HalfTest.cpp index 279bdd8dd..bb3e43684 100644 --- a/src/Magnum/Math/Test/HalfTest.cpp +++ b/src/Magnum/Math/Test/HalfTest.cpp @@ -27,7 +27,9 @@ #include #include #include +#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) #include +#endif #include "Magnum/Math/Half.h" #include "Magnum/Math/Vector3.h" @@ -62,8 +64,10 @@ struct HalfTest: Corrade::TestSuite::Tester { void literal(); void debug(); + #if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) void tweakable(); void tweakableError(); + #endif private: /* Naive / ground-truth packing helpers */ @@ -86,6 +90,7 @@ typedef Math::Constants Constants; using namespace Literals; +#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) namespace { const struct { @@ -119,6 +124,7 @@ constexpr struct { }; } +#endif HalfTest::HalfTest() { addTests({&HalfTest::unpack, @@ -150,11 +156,13 @@ HalfTest::HalfTest() { &HalfTest::literal, &HalfTest::debug}); + #if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) addInstancedTests({&HalfTest::tweakable}, Corrade::Containers::arraySize(TweakableData)); addInstancedTests({&HalfTest::tweakableError}, Corrade::Containers::arraySize(TweakableErrorData)); + #endif /* Calculate tables for table-based benchmark */ _mantissaTable[0] = 0; @@ -661,6 +669,7 @@ void HalfTest::debug() { #endif } +#if defined(DOXYGEN_GENERATING_OUTPUT) || defined(CORRADE_TARGET_UNIX) || (defined(CORRADE_TARGET_WINDOWS) && !defined(CORRADE_TARGET_WINDOWS_RT)) || defined(CORRADE_TARGET_EMSCRIPTEN) void HalfTest::tweakable() { auto&& data = TweakableData[testCaseInstanceId()]; setTestCaseDescription(data.name); @@ -682,8 +691,8 @@ void HalfTest::tweakableError() { CORRADE_COMPARE(out.str(), data.error); CORRADE_COMPARE(state, data.state); } +#endif }}} CORRADE_TEST_MAIN(Magnum::Math::Test::HalfTest) -