A tick-tock release cycle allows easy migration to new software versions. Obsolete code is marked as deprecated for one major release. Deprecated code produces compile-time warnings. These warning serve as notification to users that their code should be upgraded. The next major release will remove the deprecated code.
-
The major version has been removed from the cmake project name and the package.xml package name. Use
find_package(gz-cmake)instead offind_package(gz-cmakeX)going forward. -
Removed: gz-cmake-utilities target
-
Removed:
gz/utilities/ExtraTestMacros.hh -
Removed:
gz/utilities/SuppressWarning.hh
-
The minimum required cmake version is now 3.22.1.
-
Breaking: C/C++ projects enable the
visibility=hiddencompiler flag by default. gz-cmake4 changes gz-cmake projects to use C/C++ visibility hidden by default. This is a potential breaking changed for projects using gz-cmake but the benefits in terms of creating portable code and time spend by the loader could be relevant. To avoid this change, the EXPOSE_SYMBOLS_BY_DEFAULT flag can be used in the gz_configure_project call. The change deprecates the HIDDEN_SYMBOLS_BY_DEFAULT flag that can be removed. -
Breaking: Now the code generates always a
doctarget that can be called to generate the documentation. Thedoctarget is excluded from the ALL target so it needs to be explicitly triggered. -
Deprecated:
BUILD_DOCSCMake arguments is deprecated. Replacement: building docs is excluded from the default build and needs to be explicitly triggered by calling thedoctarget. -
Deprecated:
GzPython.cmakeReplacement: Usefind_package(Python3)to find Python3 and thePython3_EXECUTABLEvariable instead ofPYTHON_EXECUTABLE. -
Deprecated:
gz/utilities/ExtraTestMacros.hhReplacement:gz/utils/ExtraTestMacros.hhfrom gz-utils -
Deprecated:
gz/utilities/SuppressWarning.hhReplacement:gz/utils/SuppressWarning.hhfrom gz-utils
-
Breaking: Examples are now built using native cmake. Two targets will be generated for each set of examples:
EXAMPLES_Build_TESTandEXAMPLES_Configure_TESTExamples are not built by default, but instead requireBUILD_EXAMPLES:bool=Trueto be set. This is because examples require the package of interest to be installed viamake install. -
Breaking: The project name has been changed to use the
gz-prefix, you must use thegzprefix!
- This also means that any generated code that use the project name (e.g. CMake variables, in-source macros) would have to be migrated.
- Some non-exhaustive examples of this include:
GZ_<PROJECT>_<VISIBLE/HIDDEN>- CMake
-configfiles - Paths that depend on the project name :
- Deprecated: include/ignition/utilities/SuppressWarning.hh Replacement: include/ignition/utils/SuppressWarning.hh (in the gz-utils package)
- Deprecated: include/ignition/utilities/ExtraTestMacros.hh Replacement: include/ignition/utils/ExtraTestMacros.hh (in the gz-utils package)
- Deprecated: CMake functions and macros starting with
ign_Replacement: CMake functions and macros starting withgz_ - Deprecated:
ignitionnamespaces Replacement:gznamespaces - Deprecated:
Ignprefixed CMake files Replacement:Gzprefixed CMake files - Deprecated:
IGN/IGNITIONprefixed CMake variables and options Replacement:GZprefixed CMake variables and options