diff --git a/doc/building.dox b/doc/building.dox index 0cb17af46..64211a0c2 100644 --- a/doc/building.dox +++ b/doc/building.dox @@ -268,8 +268,8 @@ There are also Homebrew packages for @ref building-plugins-packages-brew "Magnum Minimal set of tools and libraries required for building is: - C++ compiler with good C++11 support. Compilers which are tested to have - everything needed are **GCC** >= 4.7, **Clang** >= 3.1 and **MSVC** >= 2015. - On Windows you can also use **MinGW-w64**. + everything needed are **GCC** >= 4.8.1, **Clang** >= 3.1 and **MSVC** + >= 2015. On Windows you can also use **MinGW-w64**. - **CMake** >= 2.8.12 - **Corrade** --- Plugin management and utility library. See @ref building-corrade "Corrade download and installation guide" for more diff --git a/doc/changelog.dox b/doc/changelog.dox index cc488d054..fdfcee570 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -38,6 +38,11 @@ See also: @section changelog-latest Changes since 2018.10 +@subsection changelog-latest-dependencies Dependency changes + +- Minimal supported GCC version is now 4.8.1, GCC 4.7 is not supported + anymore. + @subsection changelog-latest-new New features @subsubsection changelog-latest-new-animation Animation library diff --git a/package/archlinux/PKGBUILD-gcc47 b/package/archlinux/PKGBUILD-gcc47 deleted file mode 100644 index bd8e82580..000000000 --- a/package/archlinux/PKGBUILD-gcc47 +++ /dev/null @@ -1,74 +0,0 @@ -# Author: mosra -pkgname=magnum -pkgver=dev.gcc47 -pkgrel=1 -pkgdesc="C++11/C++14 graphics middleware for games and data visualization (built with GCC 4.7)" -arch=('i686' 'x86_64') -url="https://magnum.graphics" -license=('MIT') -depends=('corrade' 'openal' 'freeglut' 'sdl2' 'glfw') -makedepends=('cmake' 'ninja' 'gcc47') -options=('!strip') -provides=('magnum-git') - -_rootdir=$startdir/../../ - -build() { - # Disable flags unknown to GCC 4.7 - newcxxflags=$(echo $CXXFLAGS | sed s/-fstack-protector-strong.//g) - export CXXFLAGS="$newcxxflags" - - if [ ! -d "$_rootdir/build-gcc47" ] ; then - mkdir "$_rootdir/build-gcc47" - cd "$_rootdir/build-gcc47" - - cmake .. \ - -DCMAKE_CXX_COMPILER=g++-4.7 \ - -G Ninja - fi - - cd "$_rootdir/build-gcc47" - - cmake .. \ - -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DWITH_AUDIO=ON \ - -DWITH_SHAPES=ON \ - -DWITH_GLFWAPPLICATION=ON \ - -DWITH_GLUTAPPLICATION=ON \ - -DWITH_GLXAPPLICATION=ON \ - -DWITH_SDL2APPLICATION=ON \ - -DWITH_XEGLAPPLICATION=ON \ - -DWITH_WINDOWLESSGLXAPPLICATION=ON \ - -DWITH_EGLCONTEXT=ON \ - -DWITH_GLXCONTEXT=ON \ - -DWITH_OPENGLTESTER=ON \ - -DWITH_ANYAUDIOIMPORTER=ON \ - -DWITH_ANYIMAGECONVERTER=ON \ - -DWITH_ANYIMAGEIMPORTER=ON \ - -DWITH_ANYSCENEIMPORTER=ON \ - -DWITH_MAGNUMFONT=ON \ - -DWITH_MAGNUMFONTCONVERTER=ON \ - -DWITH_OBJIMPORTER=ON \ - -DWITH_TGAIMAGECONVERTER=ON \ - -DWITH_TGAIMPORTER=ON \ - -DWITH_WAVAUDIOIMPORTER=ON \ - -DWITH_DISTANCEFIELDCONVERTER=ON \ - -DWITH_FONTCONVERTER=ON \ - -DWITH_IMAGECONVERTER=ON \ - -DWITH_GL_INFO=ON \ - -DWITH_AL_INFO=ON \ - -DBUILD_TESTS=ON \ - -DBUILD_GL_TESTS=ON - ninja -} - -check() { - cd "$_rootdir/build-gcc47" - CORRADE_TEST_COLOR=ON ctest --output-on-failure -j5 -} - -package() { - cd "$_rootdir/build-gcc47" - DESTDIR="$pkgdir/" ninja install -} diff --git a/src/Magnum/DebugTools/CompareImage.cpp b/src/Magnum/DebugTools/CompareImage.cpp index 78be3a538..faa843170 100644 --- a/src/Magnum/DebugTools/CompareImage.cpp +++ b/src/Magnum/DebugTools/CompareImage.cpp @@ -375,10 +375,8 @@ void printPixelDeltas(Debug& out, const std::vector& delta, const ImageVi /* Find first maxCount values above mean threshold and put them into a sorted map */ std::multimap large; - for(std::size_t i = 0; i != delta.size(); ++i) { - /* GCC 4.7 std::multimap doesn't have emplace() */ - if(delta[i] > meanThreshold) large.insert({delta[i], i}); - } + for(std::size_t i = 0; i != delta.size(); ++i) + if(delta[i] > meanThreshold) large.emplace(delta[i], i); CORRADE_INTERNAL_ASSERT(!large.empty()); diff --git a/src/Magnum/GL/Context.cpp b/src/Magnum/GL/Context.cpp index dfcc826af..9cbb42d66 100644 --- a/src/Magnum/GL/Context.cpp +++ b/src/Magnum/GL/Context.cpp @@ -433,7 +433,7 @@ const std::vector& Extension::extensions(Version version) { namespace { #ifdef MAGNUM_BUILD_MULTITHREADED - #if !defined(CORRADE_GCC47_COMPATIBILITY) && !defined(CORRADE_TARGET_APPLE) + #ifndef CORRADE_TARGET_APPLE thread_local #else __thread diff --git a/src/Magnum/GL/Test/AbstractShaderProgramTest.cpp b/src/Magnum/GL/Test/AbstractShaderProgramTest.cpp index a4717b5c2..a43e5bdd7 100644 --- a/src/Magnum/GL/Test/AbstractShaderProgramTest.cpp +++ b/src/Magnum/GL/Test/AbstractShaderProgramTest.cpp @@ -44,11 +44,7 @@ AbstractShaderProgramTest::AbstractShaderProgramTest() { void AbstractShaderProgramTest::constructNoCreate() { { struct Shader: AbstractShaderProgram { - #ifndef CORRADE_GCC47_COMPATIBILITY using AbstractShaderProgram::AbstractShaderProgram; - #else - explicit Shader(NoCreateT) noexcept: AbstractShaderProgram{NoCreate} {} - #endif } shader{NoCreate}; CORRADE_COMPARE(shader.id(), 0); diff --git a/src/Magnum/Image.h b/src/Magnum/Image.h index 665da1669..26fa14bae 100644 --- a/src/Magnum/Image.h +++ b/src/Magnum/Image.h @@ -334,24 +334,12 @@ template class Image { * * @see @ref release() */ - Containers::ArrayView data() - #ifndef CORRADE_GCC47_COMPATIBILITY - & - #endif - { return _data; } - #ifndef CORRADE_GCC47_COMPATIBILITY + Containers::ArrayView data() & { return _data; } Containers::ArrayView data() && = delete; /**< @overload */ - #endif /** @overload */ - Containers::ArrayView data() const - #ifndef CORRADE_GCC47_COMPATIBILITY - & - #endif - { return _data; } - #ifndef CORRADE_GCC47_COMPATIBILITY + Containers::ArrayView data() const & { return _data; } Containers::ArrayView data() const && = delete; /**< @overload */ - #endif /** @overload */ template T* data() { diff --git a/src/Magnum/Math/Frustum.h b/src/Magnum/Math/Frustum.h index 5f53078cd..427b06cfd 100644 --- a/src/Magnum/Math/Frustum.h +++ b/src/Magnum/Math/Frustum.h @@ -116,7 +116,7 @@ template class Frustum { /** @brief Frustum planes */ constexpr Corrade::Containers::StaticArrayView<6, const Vector4> planes() const { - /* GCC 4.7 needs explicit construction */ + /* GCC 4.8 needs explicit construction */ return Corrade::Containers::StaticArrayView<6, const Vector4>{_data}; } diff --git a/src/Magnum/Platform/gl-info.cpp b/src/Magnum/Platform/gl-info.cpp index 0d2d12b35..8a129892b 100644 --- a/src/Magnum/Platform/gl-info.cpp +++ b/src/Magnum/Platform/gl-info.cpp @@ -231,9 +231,6 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat #error no windowless application available on this platform #endif Debug() << "Compilation flags:"; - #ifdef CORRADE_GCC47_COMPATIBILITY - Debug() << " CORRADE_GCC47_COMPATIBILITY"; - #endif #ifdef CORRADE_BUILD_DEPRECATED Debug() << " CORRADE_BUILD_DEPRECATED"; #endif diff --git a/src/Magnum/SceneGraph/TranslationRotationScalingTransformation2D.h b/src/Magnum/SceneGraph/TranslationRotationScalingTransformation2D.h index 86b93364c..b19c6c09f 100644 --- a/src/Magnum/SceneGraph/TranslationRotationScalingTransformation2D.h +++ b/src/Magnum/SceneGraph/TranslationRotationScalingTransformation2D.h @@ -224,8 +224,9 @@ template class BasicTranslationRotationScalingTransformation2D: public Math::Vector2 _translation; Math::Complex _rotation; - /* Can't {} on GCC 4.7, _scaling(T(1)) fails on the most vexing parse - (what the ... eh???) */ + /* Can't {} on GCC 4.8 because it complains about the constructor being + explicit, _scaling(T(1)) fails on the most vexing parse (what the + ... eh???) */ Math::Vector2 _scaling = Math::Vector2(T(1)); }; diff --git a/src/Magnum/SceneGraph/TranslationRotationScalingTransformation3D.h b/src/Magnum/SceneGraph/TranslationRotationScalingTransformation3D.h index a0aa22dbf..98c689f6e 100644 --- a/src/Magnum/SceneGraph/TranslationRotationScalingTransformation3D.h +++ b/src/Magnum/SceneGraph/TranslationRotationScalingTransformation3D.h @@ -314,8 +314,9 @@ template class BasicTranslationRotationScalingTransformation3D: public Math::Vector3 _translation; Math::Quaternion _rotation; - /* Can't {} on GCC 4.7, _scaling(T(1)) fails on the most vexing parse - (what the ... eh???) */ + /* Can't {} on GCC 4.8 because it complains about the constructor being + explicit, _scaling(T(1)) fails on the most vexing parse (what the + ... eh???) */ Math::Vector3 _scaling = Math::Vector3(T(1)); }; diff --git a/src/Magnum/Text/Test/AbstractFontConverterTest.cpp b/src/Magnum/Text/Test/AbstractFontConverterTest.cpp index a7342f37f..090a131da 100644 --- a/src/Magnum/Text/Test/AbstractFontConverterTest.cpp +++ b/src/Magnum/Text/Test/AbstractFontConverterTest.cpp @@ -77,7 +77,7 @@ namespace { void AbstractFontConverterTest::convertGlyphs() { class GlyphExporter: public AbstractFontConverter { public: - /* GCC 4.7 apparently can't handle {} here */ + /* GCC 4.8 apparently can't handle {} here */ GlyphExporter(std::u32string& characters): _characters(characters) {} private: diff --git a/src/Magnum/Trade/AnimationData.h b/src/Magnum/Trade/AnimationData.h index 0f1ee6317..d189bd407 100644 --- a/src/Magnum/Trade/AnimationData.h +++ b/src/Magnum/Trade/AnimationData.h @@ -328,24 +328,12 @@ class MAGNUM_TRADE_EXPORT AnimationData { * Contains data for all tracks contained in this clip. * @see @ref release() */ - Containers::ArrayView data() - #ifndef CORRADE_GCC47_COMPATIBILITY - & - #endif - { return _data; } - #ifndef CORRADE_GCC47_COMPATIBILITY + Containers::ArrayView data() & { return _data; } Containers::ArrayView data() && = delete; /**< @overload */ - #endif /** @overload */ - Containers::ArrayView data() const - #ifndef CORRADE_GCC47_COMPATIBILITY - & - #endif - { return _data; } - #ifndef CORRADE_GCC47_COMPATIBILITY + Containers::ArrayView data() const & { return _data; } Containers::ArrayView data() const && = delete; /**< @overload */ - #endif /** @brief Duration */ Range1D duration() const { return _duration; } diff --git a/src/Magnum/Trade/ImageData.h b/src/Magnum/Trade/ImageData.h index 3085236e5..d80d117e4 100644 --- a/src/Magnum/Trade/ImageData.h +++ b/src/Magnum/Trade/ImageData.h @@ -357,24 +357,12 @@ template class ImageData { * * @see @ref release() */ - Containers::ArrayView data() - #ifndef CORRADE_GCC47_COMPATIBILITY - & - #endif - { return _data; } - #ifndef CORRADE_GCC47_COMPATIBILITY + Containers::ArrayView data() & { return _data; } Containers::ArrayView data() && = delete; /**< @overload */ - #endif /** @overload */ - Containers::ArrayView data() const - #ifndef CORRADE_GCC47_COMPATIBILITY - & - #endif - { return _data; } - #ifndef CORRADE_GCC47_COMPATIBILITY + Containers::ArrayView data() const & { return _data; } Containers::ArrayView data() const && = delete; /**< @overload */ - #endif /** @overload */ template T* data() { diff --git a/src/Magnum/Trade/MeshData2D.h b/src/Magnum/Trade/MeshData2D.h index 3abfb4a15..8f04aca65 100644 --- a/src/Magnum/Trade/MeshData2D.h +++ b/src/Magnum/Trade/MeshData2D.h @@ -81,7 +81,7 @@ class MAGNUM_TRADE_EXPORT MeshData2D { /** @brief Move constructor */ MeshData2D(MeshData2D&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept @@ -96,7 +96,7 @@ class MAGNUM_TRADE_EXPORT MeshData2D { /** @brief Move assignment */ MeshData2D& operator=(MeshData2D&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept diff --git a/src/Magnum/Trade/MeshData3D.h b/src/Magnum/Trade/MeshData3D.h index c951681c9..84bb2ab05 100644 --- a/src/Magnum/Trade/MeshData3D.h +++ b/src/Magnum/Trade/MeshData3D.h @@ -82,7 +82,7 @@ class MAGNUM_TRADE_EXPORT MeshData3D { /** @brief Move constructor */ MeshData3D(MeshData3D&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept @@ -97,7 +97,7 @@ class MAGNUM_TRADE_EXPORT MeshData3D { /** @brief Move assignment */ MeshData3D& operator=(MeshData3D&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept diff --git a/src/Magnum/Trade/MeshObjectData2D.h b/src/Magnum/Trade/MeshObjectData2D.h index 60e3ab52b..92125babc 100644 --- a/src/Magnum/Trade/MeshObjectData2D.h +++ b/src/Magnum/Trade/MeshObjectData2D.h @@ -73,7 +73,7 @@ class MAGNUM_TRADE_EXPORT MeshObjectData2D: public ObjectData2D { /** @brief Move constructor */ MeshObjectData2D(MeshObjectData2D&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept @@ -86,7 +86,7 @@ class MAGNUM_TRADE_EXPORT MeshObjectData2D: public ObjectData2D { /** @brief Move assignment */ MeshObjectData2D& operator=(MeshObjectData2D&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept diff --git a/src/Magnum/Trade/MeshObjectData3D.h b/src/Magnum/Trade/MeshObjectData3D.h index 8e3f1a46c..030d80dff 100644 --- a/src/Magnum/Trade/MeshObjectData3D.h +++ b/src/Magnum/Trade/MeshObjectData3D.h @@ -73,7 +73,7 @@ class MAGNUM_TRADE_EXPORT MeshObjectData3D: public ObjectData3D { /** @brief Move constructor */ MeshObjectData3D(MeshObjectData3D&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept @@ -86,7 +86,7 @@ class MAGNUM_TRADE_EXPORT MeshObjectData3D: public ObjectData3D { /** @brief Move assignment */ MeshObjectData3D& operator=(MeshObjectData3D&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept diff --git a/src/Magnum/Trade/ObjectData2D.h b/src/Magnum/Trade/ObjectData2D.h index 670e30146..7ff6b0afb 100644 --- a/src/Magnum/Trade/ObjectData2D.h +++ b/src/Magnum/Trade/ObjectData2D.h @@ -135,7 +135,7 @@ class MAGNUM_TRADE_EXPORT ObjectData2D { /** @brief Move constructor */ ObjectData2D(ObjectData2D&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept @@ -151,7 +151,7 @@ class MAGNUM_TRADE_EXPORT ObjectData2D { /** @brief Move assignment */ ObjectData2D& operator=(ObjectData2D&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept diff --git a/src/Magnum/Trade/ObjectData3D.h b/src/Magnum/Trade/ObjectData3D.h index 20c57c8ce..c12a66bca 100644 --- a/src/Magnum/Trade/ObjectData3D.h +++ b/src/Magnum/Trade/ObjectData3D.h @@ -136,7 +136,7 @@ class MAGNUM_TRADE_EXPORT ObjectData3D { /** @brief Move constructor */ ObjectData3D(ObjectData3D&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept @@ -152,7 +152,7 @@ class MAGNUM_TRADE_EXPORT ObjectData3D { /** @brief Move assignment */ ObjectData3D& operator=(ObjectData3D&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept diff --git a/src/Magnum/Trade/SceneData.h b/src/Magnum/Trade/SceneData.h index 64b03919a..440712e6d 100644 --- a/src/Magnum/Trade/SceneData.h +++ b/src/Magnum/Trade/SceneData.h @@ -58,7 +58,7 @@ class MAGNUM_TRADE_EXPORT SceneData { /** @brief Move constructor */ SceneData(SceneData&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept @@ -71,7 +71,7 @@ class MAGNUM_TRADE_EXPORT SceneData { /** @brief Move assignment */ SceneData& operator=(SceneData&&) /* GCC 4.9.0 (the one from Android NDK) thinks this does not match - the implicit signature so it can't be defaulted. Works on 4.7, + the implicit signature so it can't be defaulted. Works on 4.8, 5.0 and everywhere else, so I don't bother. */ #if !defined(__GNUC__) || __GNUC__*100 + __GNUC_MINOR__ != 409 noexcept diff --git a/src/MagnumPlugins/AnyImageImporter/Test/AnyImageImporterTest.cpp b/src/MagnumPlugins/AnyImageImporter/Test/AnyImageImporterTest.cpp index 128ac30da..1b59c672a 100644 --- a/src/MagnumPlugins/AnyImageImporter/Test/AnyImageImporterTest.cpp +++ b/src/MagnumPlugins/AnyImageImporter/Test/AnyImageImporterTest.cpp @@ -150,7 +150,7 @@ void AnyImageImporterTest::detect() { std::ostringstream out; Error redirectError{&out}; CORRADE_VERIFY(!importer->openFile(Utility::Directory::join(TEST_FILE_DIR, data.filename))); - /* Can't use raw string literals in macros on GCC 4.7 */ + /* Can't use raw string literals in macros on GCC 4.8 */ #ifndef CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT CORRADE_COMPARE(out.str(), Utility::formatString( "PluginManager::Manager::load(): plugin {0} is not static and was not found in nonexistent\nTrade::AnyImageImporter::{1}(): cannot load {0} plugin\n", data.plugin, data.callback ? "openData" : "openFile"));