Skip to content

Commit

Permalink
Require cmake version 3.22.1 (#396)
Browse files Browse the repository at this point in the history
Part of #350.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters authored Nov 29, 2023
1 parent e9a97b1 commit 46a7cb2
Show file tree
Hide file tree
Showing 26 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions MigrationFromClassic.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
Expand Down
2 changes: 1 addition & 1 deletion cmake/gz-all-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion cmake/gz-component-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion cmake/gz-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@")
Expand Down
2 changes: 1 addition & 1 deletion config/gz-cmake-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/comp_deps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
2 changes: 1 addition & 1 deletion examples/core_child/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/core_child_private/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/core_nodep/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
2 changes: 1 addition & 1 deletion examples/core_nodep_static/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
2 changes: 1 addition & 1 deletion examples/core_static_child/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/find_ogre2/ogre-2.1/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/find_ogre2/ogre-2.2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/find_ogre2/ogre-2.3/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/find_ogre2/ogre-2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/find_ogre2/ogre/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/gz_conf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/no_gz_prefix/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
2 changes: 1 addition & 1 deletion examples/prerelease/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/sanitizers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/use_component_depsA/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/use_component_depsB/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/use_component_depsC/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/use_config_ifp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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}/")
Expand Down

0 comments on commit 46a7cb2

Please sign in to comment.