Skip to content

Commit

Permalink
chore: fix cmake min version deprecation warning
Browse files Browse the repository at this point in the history
This commit fixed the cmake min version < 3.5 deprecation warning.
  • Loading branch information
rickstaa committed Aug 14, 2023
1 parent bba7df1 commit a5beba4
Show file tree
Hide file tree
Showing 25 changed files with 26 additions and 28 deletions.
2 changes: 1 addition & 1 deletion catkin_tools/jobs/catkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ def create_catkin_test_job(

# CMakeLists.txt for prebuild package
SETUP_PREBUILD_CMAKELISTS_TEMPLATE = """\
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(catkin_tools_prebuild)
find_package(catkin QUIET)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(catkin_pkg_cmake_err)

## Find catkin macros and libraries
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(catkin_pkg_cmake_warn)

## Find catkin macros and libraries
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(catkin_pkg_make_err)

## Find catkin macros and libraries
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(catkin_pkg_make_warn)

## Find catkin macros and libraries
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(build_type_condition)
3 changes: 1 addition & 2 deletions tests/system/resources/catkin_pkgs/cmake_args/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(cmake_args)

find_package(catkin REQUIRED)
Expand All @@ -16,4 +16,3 @@ endif()
if(NOT VAR3)
message(SEND_ERROR "VAR3 NOT DEFINED!")
endif()

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(cmake_err)
find_package(catkin REQUIRED)
catkin_package()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(cmake_warning)
find_package(catkin REQUIRED)
catkin_package()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(build_type_condition)
2 changes: 1 addition & 1 deletion tests/system/resources/catkin_pkgs/make_err/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(make_err)
find_package(catkin REQUIRED)
catkin_package()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(make_warning)
find_package(catkin REQUIRED)
catkin_package()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(products_0)
find_package(catkin REQUIRED)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(products_unicode)
find_package(catkin REQUIRED)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(python_pkg)
find_package(catkin REQUIRED)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(python_tests)
find_package(catkin REQUIRED)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(python_tests_err)
find_package(catkin REQUIRED)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(python_tests_targets)
find_package(catkin REQUIRED)

Expand Down
2 changes: 1 addition & 1 deletion tests/system/resources/cmake_pkgs/app_pkg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(app_pkg)

find_package(lib_pkg REQUIRED)
Expand Down
3 changes: 1 addition & 2 deletions tests/system/resources/cmake_pkgs/cmake_pkg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(cmake_pkg)

add_executable(vanilla vanilla.cpp)
Expand All @@ -7,4 +7,3 @@ install(TARGETS vanilla
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib/static)

2 changes: 1 addition & 1 deletion tests/system/resources/cmake_pkgs/lib_pkg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(lib_pkg)

# make cache variables for install destinations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(test_err_pkg)

include(CTest)
Expand Down
2 changes: 1 addition & 1 deletion tests/system/resources/cmake_pkgs/test_pkg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(test_pkg)

include(CTest)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(pkg_with_roslint)
find_package(catkin REQUIRED COMPONENTS roslint)
catkin_package()
Expand Down
4 changes: 2 additions & 2 deletions tests/system/workspace_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ class Package(object):
</export>"""

CATKIN_CMAKELISTS_TEMPLATE = """
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project({name})
find_package(catkin REQUIRED COMPONENTS {catkin_components})
catkin_package()"""

CMAKE_CMAKELISTS_TEMPLATE = """
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project({name})
{find_packages}
add_custom_target(install)"""
Expand Down

0 comments on commit a5beba4

Please sign in to comment.