Changelog

Changes since 2020.06

Dependency changes

  • Minimal supported CMake version is now 3.5, changed from 3.4, since CMake 3.27+ warns if a compatibility with CMake below 3.5 is requested. Older versions are not supported anymore and all workarounds for them were removed. This is a conservative change, as there are no known supported distributions which would have anything older than 3.5.

New features

Containers library

PluginManager library

TestSuite library

Utility library

Changes and improvements

Containers library

PluginManager library

  • The corrade_add_plugin() and corrade_add_static_plugin() CMake macros now allow the metadata file path to be absolute as well, which is useful when the file has the contents generated.

TestSuite library

Utility library

Build system

  • The library now uses -fno-strict-aliasing on GCC and contains this flag also in the CORRADE_PEDANTIC_COMPILER_OPTIONS CMake variable. Strict aliasing was disabled for the Magnum library since 2013 already, this change just brings it to all Magnum-related projects and makes it public.
  • The oldest supported Clang version is now 6.0 (available on Ubuntu 18.04), or equivalently Apple Clang 10.0 (Xcode 10). Oldest supported GCC version is still 4.8.
  • The -o option in the Single-header generator tool utility now treats the argument as a file if it doesn't exist and a directory only if it exists and is a directory (see mosra/corrade#90)
  • Fixed a potential error in UseCorrade.cmake that would happen when compiling with an unrecognized compiler (see mosra/magnum#457)
  • The version.h header now gets populated from Git correctly also when inside a CMake subproject
  • The corrade_add_test(), corrade_add_plugin(), corrade_add_static_plugin() and corrade_add_resource() CMake functions now check for presence of the targets they depend on, giving the user a clear message in case something is missing (see mosra/corrade#101)
  • Attempted a switch of Emscripten build on Travis CI from macOS to Ubuntu + Docker for 2x faster build times in a futile attempt to not use the extremely expensive features of a no-longer-free service. Ultimately, Travis banned everyone from using their CI and so all Linux, macOS, Emscripten, Android and iOS builds were migrated from Travis to Circle CI, together with adding also an explicit ARM64 build. See mosra/corrade#105, mosra/magnum#350 and mosra/magnum#523.
  • On CMake 3.16 and newer, FindCorrade.cmake can provide additional details if some component is not found
  • The Homebrew package now uses std_cmake_args instead of hardcoded build type and install prefix, which resolves certain build issues (see mosra/homebrew-magnum#6)
  • CORRADE_DEPRECATED_ENUM() is now a no-op for Qt's Meta Object Compiler as it caused parse errors on older Qt versions
  • With CMake 3.20 and newer it's possible to compile for Android NDK r19+ without explicitly supplying various system paths. Additionally, when CMAKE_INSTALL_PREFIX points to Android NDK sysroot, the LIB_SUFFIX gets autodetected to a correct triplet + API level version subdirectory, making the installed project discoverable by both vanilla CMake and Gradle. On CMake 3.16 to 3.19 it's required to set two extra variables for the same effect. See Cross-compiling for Android and mosra/magnum#310 for more information.
  • Updated Debian build instructions to pass --no-sign to dpkg-buildpackage, avoiding a confusing error message that might lead people to think the packaging failed (see mosra/magnum-plugins#105)
  • Updated Emscripten toolchains to not pass -s WASM to the compiler, as only the linker needs it and recent versions complain loudly (see mosra/toolchains#16)
  • Updated Emscripten toolchains to set CMAKE_<LANG>_COMPILER to the cache so MSVC IntelliSense can work with it (see mosra/toolchains#17)
  • Corrade/Utility/Memory.h now has #include <malloc.h> on Windows as well instead of declaring aligned memory allocation functions on its own, as it's not worth the seriously-looking compiler warnings (see mosra/corrade#145)
  • Platforms that support CORRADE_CPU_USE_IFUNC will now build certain code paths optimized for multiple architectures, with the best variant selected at runtime using the Cpu library based on available CPU features. This behavior can be disabled with the CORRADE_BUILD_CPU_RUNTIME_DISPATCH CMake option. Platforms without IFUNC support implement runtime dispatch using function pointers instead of indirect functions and have this currently disabled by default.
  • Various warning fixes (see mosra/corrade#151)
  • Preventing a build error on Emscripten if CORRADE_UTILITY_USE_ANSI_COLORS is passed to CMake (see mosra/corrade#153)
  • The corrade_add_test() CMake macro now recognizes a new CORRADE_TESTSUITE_TEST_TARGET CMake variable to put tests into a dedicated target instead of building them as part of the implicit ALL target.
  • Updated Corrade/Utility/StlForwardArray.h and Corrade/Utility/StlForwardTuple.h to work on libc++ 16
  • On Windows there's a new CORRADE_BUILD_STATIC_UNIQUE_GLOBALS_DLL_NAME CMake option to aid CORRADE_BUILD_STATIC_UNIQUE_GLOBALS in cases where Corrade is only linked to a DLL but not the main executable.
  • Worked around a compilation failure on MSVC 2022 with /fsanitize=address /std:c++17 /permissive-, where a definition of __sanitizer_annotate_contiguous_container() in Corrade/Containers/GrowableArray.h would conflict with MSVC's own in <vector> that additionally has a noexcept specifier
  • Made it possible to optionally find TestSuite via find_package() without causing a fatal error if not found on platforms that need additional runner files like XCTest, Android and Emscripten. See also mosra/corrade#170.
  • It's now possible to build dynamic libraries on Android and Emscripten with the usual options. Static libraries are still a default but it isn't enforced anymore. See mosra/corrade#170.
  • Fixed a build error related to the environ variable on macOS versions before 10.8. See mosra/corrade#175.
  • The Emscripten toolchain now prefers include directory located in the Emscripten cache, which as of Emscripten 3.0.4 contains the version.h header. See mosra/corrade#133.
  • The Emscripten toolchain now uses the -flto flag instead of --llvm-lto, which was specific to the fastcomp backend that's removed as of Emscripten 2.0, and sets up correct emar to be used for LTO. See mosra/toolchains#13, mosra/toolchains#14 and mosra/magnum#490.
  • The Emscripten build now uses --js-library instead of inline EM_ASM() for calling into JavaScript. This allows it to properly specify its runtime dependencies without risking breakages when new Emscripten versions make more JS API functions optional, and circumvents the need for users to specify -s EXPORTED_FUNCTIONS on their side.
  • Utility::Path::copy() now uses an 8 kB buffer instead of 128 kB to not crash on Emscripten 3.1.27+, which reduced the default stack size from 5 MB to 64 kB.
  • New #pragma ACME forget option in the Single-header generator tool utility
  • /OPT:NOICF is now added for the Interconnect library for clang-cl as well (see mosra/corrade#178)
  • The Emscripten toolchain no longer uses a *.bc extension for static libraries, as that breaks builds with version 3.1.52+. See mosra/magnum#633 for more information.

Bug fixes

Deprecated APIs

Potential compatibility breakages, removed APIs

Documentation

2020.06

Released 2020-06-27, tagged as v2020.06.

New features

Containers library

PluginManager library

TestSuite library

Utility library

Changes and improvements

  • TestSuite::Tester and the CORRADE_INTERNAL_ASSERT() family of macros now prints file/line info in test failures as a more compact <file>:<line>, which is consistent with Utility::Debug source location and how GCC or GDB print those
  • Added an ability to disable unique globals across shared libraries using CORRADE_BUILD_STATIC_UNIQUE_GLOBALS on static builds that don't need it
  • Library version is now exposed through CORRADE_VERSION_YEAR, CORRADE_VERSION_MONTH, CORRADE_VERSION_COMMIT, CORRADE_VERSION_HASH and CORRADE_VERSION_STRING preprocessor defines in a new Corrade/version.h header. This header is not included by any other header to avoid trigerring a full rebuild when Git commit changes. If Git is not found, only the first two defines are present.

Containers library

Interconnect library

  • Interconnect::connect() now can recognize trivially copyable lambdas also on GCC versions before 5 and store them more efficiently

PluginManager library

TestSuite library

Utility library

Build system

  • Fixed compilation of the Corrade::Main library on i686 MinGW
  • UseCorrade.cmake defined NOMINMAX and WIN32_LEAN_AND_MEAN by mistake only on MSVC, causing windows.h to leak unforgivable crimes when compiling under MinGW (see mosra/magnum-plugins#74)
  • Fixed MSVC detection in conanfile.py, made it aware of the MSVC2019_COMPATIBILITY option as well (see mosra/corrade#93)
  • The library again compiles and tests cleanly with CORRADE_NO_ASSERT enabled, and this setup is verified on the CI to avoid further regressions
  • Fixes to make the library work under MinGW Clang (see mosra/corrade#95)
  • Fixed compilation on GCC 10 (see mosra/corrade#97)
  • UseAndroid.cmake no longer expects adb to be in $PATH, but it locates it relatively to Android SDK (see mosra/toolchains#10)
  • Various warning fixes (see mosra/corrade#96)

Bug fixes

  • The CORRADE_TARGET_LIBSTDCXX macro was defined on GCC < 5 only when certain headers were included before. That caused problems especially with the new CORRADE_STD_IS_TRIVIALLY_TRAITS_SUPPORTED macro and is now fixed to assume old GCC versions always use libstdc++.
  • Fixed an assertion in Utility::Arguments when a single - was passed on the command-line
  • Utility::Endianness::swapInPlace() and other in-place APIs were fixed to work correctly on platforms that don't allow unaligned reads and writes
  • Utility::ConfigurationValue was saving double and long double with only 6 precision digits due to silly std::ostream defaults. Now it prints those with 15 and 18 digits respectively, consistent with Utility::Debug and Utility::format() output
  • As internals of PluginManager::Manager were rewritten to not need any shared global state anymore, various corner cases and crashes on destruction are not happening anymore. In particular, it's now also possible to have two instances of the same manager type without the two interfering with each other in any way.

Documentation

Deprecated APIs

  • Utility::Directory::map(const std::string&, std::size_t) is deprecated and renamed to Utility::Directory::mapWrite() as it doesn't preserve original file contents and thus can't be used for read-write access
  • The internal CORRADE_BIG_ENDIAN macro got renamed to CORRADE_TARGET_BIG_ENDIAN and made public. The old variant is still present for backwards compatibility, but will be removed in the future.

Potential compatibility breakages, removed APIs

  • CORRADE_ASSERT_UNREACHABLE() now accepts a message and will fail to compile when used with an empty argument list. The original functionality is provided by CORRADE_INTERNAL_ASSERT_UNREACHABLE() instead.
  • Containers::Array and Containers::StaticArray was switched to do the Containers::ValueInit construction by default instead of Containers::DefaultInit, i.e. zero-initializing trivial types instead of keeping them uninitialized. Apart from introducing potential slowdowns due to the additional zero-ininitialization this isn't really breaking, just makes the default safer; and you still have the option to choose a different initialization.
  • Utility::Debug and Utility::format() now prints long double with 15 significant digits instead of 18 on platforms where it is 64-bit instead of 80-bit
  • Utility::Endianness is now a namespace, similarly to the change done to Utility::Directory or Utility::String in 2018.02. The API doesn't change apart from that, but code previously doing using Utility::Endianness needs to be changed to using namespace Utility::Endianness to compile again.
  • Removed Corrade/Utility/AndroidStreamBuffer.h that was deprecated in 2018.04, use Corrade/Utility/AndroidLogStreamBuffer.h instead
  • Removed PluginManager::Manager::instance() that was deprecated in 2018.04, use PluginManager::Manager::instantiate() instead

2019.10

Released 2019-10-24, tagged as v2019.10.

Dependency changes

  • Minimal supported CMake version is now 3.4. Older versions are not supported anymore and all workarounds for them were removed. Download a prebuilt release of a newer version if you need to use Corrade on older systems (such as Ubuntu 14.04 or Debian 8). This is a conservative change that shouldn't affect any additional distribution compared to the CMake 3.1 requirement in 2019.01.

New features

Containers library

PluginManager library

TestSuite library

  • Custom TestSuite comparators can now optionally save diagnostic files as well as print formatted messages to the output. See Saving diagnostic files for more information.
  • Added TestSuite::Tester::setTestCaseTemplateName() for convenient distinction of different specializations of templated test cases
  • TestSuite::Tester now warns when dynamic CPU scaling is used on Linux and benchmarks are being run, as that makes the measurements rather noisy. With the --verbose command-line option it prints further information.

Utility library

Changes and improvements

Containers library

Interconnect library

  • The Interconnect library internals got reworked with less allocations, better memory usage, improved signal emitting performance and support for connecting to arbitrary function objects along with std::function. See also mosra/corrade#63 for more information.

PluginManager library

  • Instantiating a PluginManager::Manager without an explicit plugin directory will only print a warning about no dynamic plugins found if there's no statically linked plugin either. That makes it behave better on setups where all plugins are always linked statically.
  • PluginManager::Manager now explicitly checks for presence of a plugin metadata file for dynamic plugins and fails with PluginManager::LoadState::WrongMetadataFile if it's not found. Previously it was silently ignoring missing metadata files, often resulting in a runtime linker error due to a dependency not being loaded.
  • CORRADE_PLUGIN_REGISTER() now operates completely without heap access, making it safe to run in restricted phases of application execution
  • PluginManager::AbstractPlugin now implements a destructive move constructor

TestSuite library

Utility library

Build system

  • MSYS2 packages are now in official repositories, installable directly via pacman
  • The CORRADE_CXX_STANDARD preprocessor macro learned support for the upcoming C++2a standard. The equivalent CMake property can now be set to 20 to pass the -std=c++2a flag to GCC and Clang and /std:c++latest to MSVC.
  • It's now possible to use the TestSuite library via CMake subprojects also on Android, iOS and Emscripten
  • Explicitly disabling a MSVC linker optimization that causes seemingly similar signals to be conflated together, causing erratic behavior. This is done automatically for CMake-based projects, see the Interconnect::Emitter documentation for more information when using custom buildsystems, see also mosra/corrade#51.
  • Fixed compilation with Clang and -std=gnu++14 (see mosra/corrade#62)
  • CORRADE_VISIBILITY_STATIC no longer exports symbols in static libraries to be consistent with hidden visibility by default, additionally -fvisibility-inlines-hidden is passed along with -fvisibility=hidden when CORRADE_USE_PEDANTIC_FLAGS property is enabled in CMake on GCC and Clang to avoid linker warnings on macOS (see mosra/corrade#53)
  • The Emscripten CMake toolchain now sets the EMSCRIPTEN variable to help 3rd party projects (see mosra/toolchains#7)
  • The Emscripten CMake toolchain now looks for emcc on $PATH as a last resort and then uses the parent directory as EMSCRIPTEN_PREFIX (see mosra/toolchains#8)
  • On Windows, if the Emscripten toolchain detects Visual Studio being used as a generator, it'll fail with an error suggesting to use a different generator instead. Previously, CMake silently fell back to using Visual Studio as a C++ compiler, resulting in seemingly impossible errors. See mosra/corrade#78.
  • Clarified interaction of -fvisibility-inlines-hidden and/or -Wl,-Bsymbolic-functions GCC/Clang flags and Interconnect::Emitter
  • The TestSuite library and all tests created with corrade_add_test() are now built with -s DISABLE_EXCEPTION_CATCHING=0 being explicitly specified both for the compiler and linker to work correctly on Emscripten 1.38.36 and newer
  • Emscripten builds now have the -fPIC option disabled by default as it causes linker errors related to __memory_base on 1.38.36 (see also emscripten-core/emscripten#8761)
  • Fixed dynamic plugin metadata location when CMAKE_LIBRARY_OUTPUT_DIRECTORY is set (see mosra/corrade#74)
  • With CMake 3.15 there's an unfortunate collision between CORRADE_CXX_STANDARD and CMake's own COMPILE_FEATURES target property, where a request to use C++14 from a 3rd party library would get ignored with C++11 being used instead. To fix that, the CORRADE_CXX_STANDARD property does nothing if the COMPILE_FEATURES property is set on the target as well. See Using Corrade with CMake for more information.
  • Fixed corrade_add_test() when library output path is set in CMake (see mosra/corrade#77)
  • Plugin metadata are now copied next to the binary as a post-build command instead of only during a full build
  • Updated the iOS toolchain to make find_package(Threads) work correctly

Bug fixes

  • The TestSuite::Comparator class by mistake did not have fuzzy comparison for long double
  • Fixed TestSuite::Compare::around() for types that don't have a total ordering (for example, for Magnum matrix and vector types, !(a < b) might not necessarily imply that a >= b).
  • Fixed build on big-endian platforms (see mosra/corrade#58)
  • Fixed Utility::Sha1 calculation on big-endian platforms (see mosra/corrade#60)
  • Fixed Utility::Directory::read() to not use ftello() on 32-bit Android and API levels below 24
  • Fixed Utility::Directory::read() to work with files that report an early EOF (such as stuff from /sys on Linux)
  • Fixed Interconnect::Emitter::emit() for signals from multiply-inherited base classes on MSVC — it was due to an insufficiently tested workaround for a template deduction limitation in the compiler (see mosra/corrade#51)
  • Interconnect::Emitter::emit() now works correctly on MSVC for signals from classes where multiple and/or virtual inheritance is involved (see mosra/corrade#51)
  • Fixed CORRADE_COMPARE_WITH() to be callable with expressions such as *comparator
  • Fixed Utility::Tweakable to work correctly with buildsystems using absolute paths for __FILE__ macros (such as Makefiles, Ninja is using relative paths). See mosra/corrade#61.
  • In some corner cases, automatic registering / unregistering of Utility::Resource data happens more than once. While this was allowed for registration, the unregistration caused an assert to be fired. Fixed this to be allowed on both.
  • Utility::Directory::copy() wasn't properly freeing both opened files if one of them failed to open (see mosra/corrade#70)
  • Interconnect::Emitter::emit() (and signal/slot connections in general) now work correctly with non-copyable arguments
  • Fixed Utility::Debug::isTty() (and thus also TestSuite colored output) to reliably work on macOS. Because Xcode output window doesn't support ANSI color escape codes, tt was relying on an undocumented $XPC_SERVICE_NAME variable that was always defined inside Xcode to disable colored output. Nowadays this variable is sometimes defined outside as well, making the check unreliable. Fixed by testing for $TERM instead, see mosra/corrade#73 for more information.

Deprecated APIs

  • Single-argument Utility::Arguments::setHelp() is now deprecated in favor of Utility::Arguments::setGlobalHelp() to avoid it being used for documenting named arguments by accident.
  • Utility::Directory::fileExists() is now deprecated in favor of Utility::Directory::exists(). It was named like this to prevent it from looking like it works on directories only, but such name then caused people to ask if it works on directories as well, not helping anything.
  • Interconnect::Connection::isConnected() and Interconnect::Connection::disconnect() are deprecated and print a warning at runtime as the redesigned internals of the Interconnect library now make it impossible to check that the original Interconnect::Emitter object still exists. Use Interconnect::Emitter::isConnected() and Interconnect::disconnect() instead.
  • Re-connecting a disconnected signal using Interconnect::Connection::isConnectionPossible() and Interconnect::Connection::connect() is not possible anymore in order to make the Interconnect library more efficient. These two functions are now deprecated and just returningthe value of (also deprecated) isConnected().
  • Signatures of TestSuite::Comparator methods were changed in order to support new features. The old variant with operator()() returning a bool and printErrorMessage() instead of printMessage() is still supported for backwards compatibility but custom comparators are strongly advised to upgrade

Potential compatibility breakages, removed APIs

Documentation

2019.01

Released 2019-02-04, tagged as v2019.01.

Dependency changes

  • Minimal supported GCC version is now 4.8.1, GCC 4.7 is not supported anymore. Minimal Clang version is now 3.3, since that's the first version with a complete C++11 support. See also mosra/magnum#274.
  • Minimal supported CMake version is now 3.1. Older versions are not supported anymore and all workarounds for them were removed. Download a prebuilt release of a newer version if you need to use Corrade on older systems (such as Ubuntu 14.04 or Debian 8). See also mosra/magnum#274.

New features

  • Various Corrade features are now being available also as single-header libraries for easier integration into your projects. See Single-header libraries for more information.

Containers library

Utility library

Changes and improvements

Containers library

PluginManager library

Utility library

  • Prefixed or prefix-ignoring Utility::Arguments now work better with 3rd party argument parsers which may be less restrictive about argument name format; arguments that are ignored are not checked for key validity anymore (see mosra/magnum#305)

Build system

Bug fixes

Deprecated APIs

Potential compatibility breakages, removed APIs

Documentation

2018.10

Released 2018-10-23, tagged as v2018.10.

New features

Containers library

PluginManager library

Utility library

Changes and improvements

Containers library

PluginManager library

  • Plugins are now loaded from the filesystem in an alphabetical order for predictable behavior across different systems

TestSuite library

  • Adapted Emscripten test runner markup for consistency with the m.css theme used in Magnum
  • It's now possible to have non-copyable and non-moveable TestSuite::Comparator specializations

Utility library

Build system

  • There's now a PPA for Ubuntu packages. See Packages for Debian, Ubuntu and derivatives for more information.
  • The Resource compiler utility is now fully standalone even with shared builds to minimize annoying first-time-use issues. It's also possible to build just this utility without anything else for example for crosscompiling, by enabling only WITH_RC and disabling all other CMake options.
  • Due to changes in Xcode 10, CMake before 3.12 would fail during the build of Corrade. To prevent that, when Xcode 10 is detected, the build aborts with a clear message upfront, telling the user to upgrade to CMake 3.12. See mosra/corrade#52 and cmake/cmake#18099.

Bug fixes

Documentation

  • All code snippets are now compiled, ensuring no deprecated APIs are used and no accidental compile errors are present
  • TestSuite::Comparator documentation mistakenly stated that it's possible to have multiple operator()() overloads for a single pseudo-type. Due to implementation limitations it's not.

Changelogs for previous versions are available in Archived changelogs.