From d5d3e58579bbdc0f2e67d0d588ac6998914cd792 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 28 Nov 2023 18:41:46 -0800 Subject: [PATCH] Require cmake version 3.22.1 Part of #350. Signed-off-by: Steve Peters --- CMakeLists.txt | 2 +- Migration.md | 4 ++++ MigrationFromClassic.md | 4 ++-- cmake/gz-all-config.cmake.in | 2 +- cmake/gz-component-config.cmake.in | 2 +- cmake/gz-config.cmake.in | 2 +- config/gz-cmake-config.cmake.in | 2 +- examples/comp_deps/CMakeLists.txt | 2 +- examples/core_child/CMakeLists.txt | 2 +- examples/core_child_private/CMakeLists.txt | 2 +- examples/core_nodep/CMakeLists.txt | 2 +- examples/core_nodep_static/CMakeLists.txt | 2 +- examples/core_static_child/CMakeLists.txt | 2 +- examples/find_ogre2/ogre-2.1/CMakeLists.txt | 2 +- examples/find_ogre2/ogre-2.2/CMakeLists.txt | 2 +- examples/find_ogre2/ogre-2.3/CMakeLists.txt | 2 +- examples/find_ogre2/ogre-2/CMakeLists.txt | 2 +- examples/find_ogre2/ogre/CMakeLists.txt | 2 +- examples/gz_conf/CMakeLists.txt | 2 +- examples/no_gz_prefix/CMakeLists.txt | 2 +- examples/prerelease/CMakeLists.txt | 2 +- examples/sanitizers/CMakeLists.txt | 2 +- examples/use_component_depsA/CMakeLists.txt | 2 +- examples/use_component_depsB/CMakeLists.txt | 2 +- examples/use_component_depsC/CMakeLists.txt | 2 +- examples/use_config_ifp/CMakeLists.txt | 2 +- 26 files changed, 30 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 793af7bf..aead1f7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) #============================================================================ # Initialize the project diff --git a/Migration.md b/Migration.md index 12c3d352..581cbae8 100644 --- a/Migration.md +++ b/Migration.md @@ -5,6 +5,10 @@ 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. +## Gazebo CMake 3.X to 4.X + +1. The minimum required cmake version is now 3.22.1. + ## Gazebo CMake 2.X to 3.X 1. **Breaking**: Examples are now built using native cmake. diff --git a/MigrationFromClassic.md b/MigrationFromClassic.md index 7f197098..8e650b12 100644 --- a/MigrationFromClassic.md +++ b/MigrationFromClassic.md @@ -25,9 +25,9 @@ your project is migrated properly. ### Clear out your top-level `CMakeLists.txt` entirely That's right, just throw it all out. -### Begin your top-level `CMakeLists.txt` with `cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)` +### Begin your top-level `CMakeLists.txt` with `cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)` -We're migrating to 3.10 because it provides many valuable features that we are +We're migrating to 3.22 because it provides many valuable features that we are now taking advantage of. ### Then call `find_package(gz-cmake4 REQUIRED)` diff --git a/cmake/gz-all-config.cmake.in b/cmake/gz-all-config.cmake.in index b1a835b0..d2002256 100644 --- a/cmake/gz-all-config.cmake.in +++ b/cmake/gz-all-config.cmake.in @@ -12,7 +12,7 @@ # ################################################################################ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) if(@PKG_NAME@_ALL_CONFIG_INCLUDED) return() diff --git a/cmake/gz-component-config.cmake.in b/cmake/gz-component-config.cmake.in index 0df01b56..5a2978fc 100644 --- a/cmake/gz-component-config.cmake.in +++ b/cmake/gz-component-config.cmake.in @@ -29,7 +29,7 @@ # taking on these version settings, and then that stack will POP after the # find_package(~) has exited, so this will not affect the cmake policy settings # of a caller. -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) if(@component_pkg_name@_CONFIG_INCLUDED) return() diff --git a/cmake/gz-config.cmake.in b/cmake/gz-config.cmake.in index 1c853e87..2d08fd63 100644 --- a/cmake/gz-config.cmake.in +++ b/cmake/gz-config.cmake.in @@ -30,7 +30,7 @@ # taking on these version settings, and then that stack will POP after the # find_package(~) has exited, so this will not affect the cmake policy settings # of a caller. -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) if(NOT @PKG_NAME@_FIND_QUIETLY) message(STATUS "Looking for @PKG_NAME@ -- found version @PROJECT_VERSION_FULL@") diff --git a/config/gz-cmake-config.cmake.in b/config/gz-cmake-config.cmake.in index 105fbe3a..809dc222 100644 --- a/config/gz-cmake-config.cmake.in +++ b/config/gz-cmake-config.cmake.in @@ -13,7 +13,7 @@ # taking on these version settings, and then that stack will POP after the # find_package(~) has exited, so this will not affect the cmake policy settings # of a caller. -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) if(@PKG_NAME@_CONFIG_INCLUDED) return() diff --git a/examples/comp_deps/CMakeLists.txt b/examples/comp_deps/CMakeLists.txt index 096a1480..563e3b18 100644 --- a/examples/comp_deps/CMakeLists.txt +++ b/examples/comp_deps/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-component_deps VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) gz_configure_project( diff --git a/examples/core_child/CMakeLists.txt b/examples/core_child/CMakeLists.txt index 6a710cde..60393659 100644 --- a/examples/core_child/CMakeLists.txt +++ b/examples/core_child/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-core_child VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) gz_configure_project() diff --git a/examples/core_child_private/CMakeLists.txt b/examples/core_child_private/CMakeLists.txt index 5074b893..72d12928 100644 --- a/examples/core_child_private/CMakeLists.txt +++ b/examples/core_child_private/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-core_child_private VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) gz_configure_project() diff --git a/examples/core_nodep/CMakeLists.txt b/examples/core_nodep/CMakeLists.txt index 54c9fba6..f7ed3a5d 100644 --- a/examples/core_nodep/CMakeLists.txt +++ b/examples/core_nodep/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-core_no_deps VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) gz_configure_project( diff --git a/examples/core_nodep_static/CMakeLists.txt b/examples/core_nodep_static/CMakeLists.txt index ca85e4fc..27f29d58 100644 --- a/examples/core_nodep_static/CMakeLists.txt +++ b/examples/core_nodep_static/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-core_no_deps_static VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) gz_configure_project( diff --git a/examples/core_static_child/CMakeLists.txt b/examples/core_static_child/CMakeLists.txt index 6e83c7c1..dbe6c8d0 100644 --- a/examples/core_static_child/CMakeLists.txt +++ b/examples/core_static_child/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-core_static_child VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) gz_configure_project() diff --git a/examples/find_ogre2/ogre-2.1/CMakeLists.txt b/examples/find_ogre2/ogre-2.1/CMakeLists.txt index c9101f68..91537966 100644 --- a/examples/find_ogre2/ogre-2.1/CMakeLists.txt +++ b/examples/find_ogre2/ogre-2.1/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-ogre-2.1 VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) diff --git a/examples/find_ogre2/ogre-2.2/CMakeLists.txt b/examples/find_ogre2/ogre-2.2/CMakeLists.txt index c197e1e9..20f8b114 100644 --- a/examples/find_ogre2/ogre-2.2/CMakeLists.txt +++ b/examples/find_ogre2/ogre-2.2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-ogre-2.2 VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) diff --git a/examples/find_ogre2/ogre-2.3/CMakeLists.txt b/examples/find_ogre2/ogre-2.3/CMakeLists.txt index 03c955ff..78f6307d 100644 --- a/examples/find_ogre2/ogre-2.3/CMakeLists.txt +++ b/examples/find_ogre2/ogre-2.3/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-ogre-2.3 VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) diff --git a/examples/find_ogre2/ogre-2/CMakeLists.txt b/examples/find_ogre2/ogre-2/CMakeLists.txt index fc343ac2..8a9f8857 100644 --- a/examples/find_ogre2/ogre-2/CMakeLists.txt +++ b/examples/find_ogre2/ogre-2/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-ogre-2 VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) diff --git a/examples/find_ogre2/ogre/CMakeLists.txt b/examples/find_ogre2/ogre/CMakeLists.txt index 5e96374f..8fe73fca 100644 --- a/examples/find_ogre2/ogre/CMakeLists.txt +++ b/examples/find_ogre2/ogre/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-ogre VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) diff --git a/examples/gz_conf/CMakeLists.txt b/examples/gz_conf/CMakeLists.txt index 1f76cf0a..31de84a1 100644 --- a/examples/gz_conf/CMakeLists.txt +++ b/examples/gz_conf/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-minimal0 VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) gz_configure_project() diff --git a/examples/no_gz_prefix/CMakeLists.txt b/examples/no_gz_prefix/CMakeLists.txt index 63d4a30c..1696ac75 100644 --- a/examples/no_gz_prefix/CMakeLists.txt +++ b/examples/no_gz_prefix/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(no_gz_prefix VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) gz_configure_project( diff --git a/examples/prerelease/CMakeLists.txt b/examples/prerelease/CMakeLists.txt index 081a399c..ba1ac744 100644 --- a/examples/prerelease/CMakeLists.txt +++ b/examples/prerelease/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-minimal1 VERSION 1.0.0) find_package(gz-cmake4 REQUIRED) gz_configure_project(VERSION_SUFFIX pre1) diff --git a/examples/sanitizers/CMakeLists.txt b/examples/sanitizers/CMakeLists.txt index 5971cc44..bfb02883 100644 --- a/examples/sanitizers/CMakeLists.txt +++ b/examples/sanitizers/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-sanitizers VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) gz_configure_project() diff --git a/examples/use_component_depsA/CMakeLists.txt b/examples/use_component_depsA/CMakeLists.txt index f8783e6e..02f9e164 100644 --- a/examples/use_component_depsA/CMakeLists.txt +++ b/examples/use_component_depsA/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-use_component_depsA VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) gz_configure_project() diff --git a/examples/use_component_depsB/CMakeLists.txt b/examples/use_component_depsB/CMakeLists.txt index d50fd020..cebcdf8f 100644 --- a/examples/use_component_depsB/CMakeLists.txt +++ b/examples/use_component_depsB/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-use_component_depsB VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) gz_configure_project() diff --git a/examples/use_component_depsC/CMakeLists.txt b/examples/use_component_depsC/CMakeLists.txt index e94f9ead..bc6f1755 100644 --- a/examples/use_component_depsC/CMakeLists.txt +++ b/examples/use_component_depsC/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-use_component_depsC VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) gz_configure_project() diff --git a/examples/use_config_ifp/CMakeLists.txt b/examples/use_config_ifp/CMakeLists.txt index 28232d96..0a312098 100644 --- a/examples/use_config_ifp/CMakeLists.txt +++ b/examples/use_config_ifp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-find_config VERSION 0.1.0) find_package(gz-cmake4 REQUIRED) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/")