From a5beba4e34b3b666af7fef4acc1b6086908f808e Mon Sep 17 00:00:00 2001 From: rickstaa Date: Mon, 14 Aug 2023 13:06:50 +0200 Subject: [PATCH] chore: fix cmake min version deprecation warning This commit fixed the cmake min version < 3.5 deprecation warning. --- catkin_tools/jobs/catkin.py | 2 +- .../failure_ws/src/catkin_pkg_cmake_err/CMakeLists.txt | 2 +- .../failure_ws/src/catkin_pkg_cmake_warn/CMakeLists.txt | 2 +- .../failure_ws/src/catkin_pkg_make_err/CMakeLists.txt | 2 +- .../failure_ws/src/catkin_pkg_make_warn/CMakeLists.txt | 2 +- .../resources/catkin_pkgs/build_type_condition/CMakeLists.txt | 2 +- tests/system/resources/catkin_pkgs/cmake_args/CMakeLists.txt | 3 +-- tests/system/resources/catkin_pkgs/cmake_err/CMakeLists.txt | 2 +- .../system/resources/catkin_pkgs/cmake_warning/CMakeLists.txt | 2 +- .../resources/catkin_pkgs/depend_condition/CMakeLists.txt | 2 +- tests/system/resources/catkin_pkgs/make_err/CMakeLists.txt | 2 +- .../system/resources/catkin_pkgs/make_warning/CMakeLists.txt | 2 +- tests/system/resources/catkin_pkgs/products_0/CMakeLists.txt | 2 +- .../resources/catkin_pkgs/products_unicode/CMakeLists.txt | 2 +- tests/system/resources/catkin_pkgs/python_pkg/CMakeLists.txt | 2 +- .../system/resources/catkin_pkgs/python_tests/CMakeLists.txt | 2 +- .../resources/catkin_pkgs/python_tests_err/CMakeLists.txt | 2 +- .../resources/catkin_pkgs/python_tests_targets/CMakeLists.txt | 2 +- tests/system/resources/cmake_pkgs/app_pkg/CMakeLists.txt | 2 +- tests/system/resources/cmake_pkgs/cmake_pkg/CMakeLists.txt | 3 +-- tests/system/resources/cmake_pkgs/lib_pkg/CMakeLists.txt | 2 +- tests/system/resources/cmake_pkgs/test_err_pkg/CMakeLists.txt | 2 +- tests/system/resources/cmake_pkgs/test_pkg/CMakeLists.txt | 2 +- .../system/resources/ros_pkgs/pkg_with_roslint/CMakeLists.txt | 2 +- tests/system/workspace_factory.py | 4 ++-- 25 files changed, 26 insertions(+), 28 deletions(-) diff --git a/catkin_tools/jobs/catkin.py b/catkin_tools/jobs/catkin.py index 021b46c7..e389b00c 100644 --- a/catkin_tools/jobs/catkin.py +++ b/catkin_tools/jobs/catkin.py @@ -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) diff --git a/docs/examples/failure_ws/src/catkin_pkg_cmake_err/CMakeLists.txt b/docs/examples/failure_ws/src/catkin_pkg_cmake_err/CMakeLists.txt index d1fa42c2..fae4cb4e 100644 --- a/docs/examples/failure_ws/src/catkin_pkg_cmake_err/CMakeLists.txt +++ b/docs/examples/failure_ws/src/catkin_pkg_cmake_err/CMakeLists.txt @@ -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 diff --git a/docs/examples/failure_ws/src/catkin_pkg_cmake_warn/CMakeLists.txt b/docs/examples/failure_ws/src/catkin_pkg_cmake_warn/CMakeLists.txt index 9aa8275c..923a37a5 100644 --- a/docs/examples/failure_ws/src/catkin_pkg_cmake_warn/CMakeLists.txt +++ b/docs/examples/failure_ws/src/catkin_pkg_cmake_warn/CMakeLists.txt @@ -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 diff --git a/docs/examples/failure_ws/src/catkin_pkg_make_err/CMakeLists.txt b/docs/examples/failure_ws/src/catkin_pkg_make_err/CMakeLists.txt index a39a2771..74531115 100644 --- a/docs/examples/failure_ws/src/catkin_pkg_make_err/CMakeLists.txt +++ b/docs/examples/failure_ws/src/catkin_pkg_make_err/CMakeLists.txt @@ -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 diff --git a/docs/examples/failure_ws/src/catkin_pkg_make_warn/CMakeLists.txt b/docs/examples/failure_ws/src/catkin_pkg_make_warn/CMakeLists.txt index 1141fe3b..bb40c20b 100644 --- a/docs/examples/failure_ws/src/catkin_pkg_make_warn/CMakeLists.txt +++ b/docs/examples/failure_ws/src/catkin_pkg_make_warn/CMakeLists.txt @@ -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 diff --git a/tests/system/resources/catkin_pkgs/build_type_condition/CMakeLists.txt b/tests/system/resources/catkin_pkgs/build_type_condition/CMakeLists.txt index a96ca4af..1e569039 100644 --- a/tests/system/resources/catkin_pkgs/build_type_condition/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/build_type_condition/CMakeLists.txt @@ -1,2 +1,2 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(build_type_condition) diff --git a/tests/system/resources/catkin_pkgs/cmake_args/CMakeLists.txt b/tests/system/resources/catkin_pkgs/cmake_args/CMakeLists.txt index 50c3a19b..369fa697 100644 --- a/tests/system/resources/catkin_pkgs/cmake_args/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/cmake_args/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(cmake_args) find_package(catkin REQUIRED) @@ -16,4 +16,3 @@ endif() if(NOT VAR3) message(SEND_ERROR "VAR3 NOT DEFINED!") endif() - diff --git a/tests/system/resources/catkin_pkgs/cmake_err/CMakeLists.txt b/tests/system/resources/catkin_pkgs/cmake_err/CMakeLists.txt index 1a121fc4..49d91a13 100644 --- a/tests/system/resources/catkin_pkgs/cmake_err/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/cmake_err/CMakeLists.txt @@ -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() diff --git a/tests/system/resources/catkin_pkgs/cmake_warning/CMakeLists.txt b/tests/system/resources/catkin_pkgs/cmake_warning/CMakeLists.txt index 1dd5b7dd..6353b24a 100644 --- a/tests/system/resources/catkin_pkgs/cmake_warning/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/cmake_warning/CMakeLists.txt @@ -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() diff --git a/tests/system/resources/catkin_pkgs/depend_condition/CMakeLists.txt b/tests/system/resources/catkin_pkgs/depend_condition/CMakeLists.txt index a96ca4af..1e569039 100644 --- a/tests/system/resources/catkin_pkgs/depend_condition/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/depend_condition/CMakeLists.txt @@ -1,2 +1,2 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(build_type_condition) diff --git a/tests/system/resources/catkin_pkgs/make_err/CMakeLists.txt b/tests/system/resources/catkin_pkgs/make_err/CMakeLists.txt index 61838587..c49c2bbd 100644 --- a/tests/system/resources/catkin_pkgs/make_err/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/make_err/CMakeLists.txt @@ -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() diff --git a/tests/system/resources/catkin_pkgs/make_warning/CMakeLists.txt b/tests/system/resources/catkin_pkgs/make_warning/CMakeLists.txt index 3ee32913..f4c65980 100644 --- a/tests/system/resources/catkin_pkgs/make_warning/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/make_warning/CMakeLists.txt @@ -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() diff --git a/tests/system/resources/catkin_pkgs/products_0/CMakeLists.txt b/tests/system/resources/catkin_pkgs/products_0/CMakeLists.txt index e94326fb..1b49cff1 100644 --- a/tests/system/resources/catkin_pkgs/products_0/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/products_0/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(products_0) find_package(catkin REQUIRED) diff --git a/tests/system/resources/catkin_pkgs/products_unicode/CMakeLists.txt b/tests/system/resources/catkin_pkgs/products_unicode/CMakeLists.txt index f71deaa2..f31dc53d 100644 --- a/tests/system/resources/catkin_pkgs/products_unicode/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/products_unicode/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(products_unicode) find_package(catkin REQUIRED) diff --git a/tests/system/resources/catkin_pkgs/python_pkg/CMakeLists.txt b/tests/system/resources/catkin_pkgs/python_pkg/CMakeLists.txt index 55e81aaa..7a716fbf 100644 --- a/tests/system/resources/catkin_pkgs/python_pkg/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/python_pkg/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(python_pkg) find_package(catkin REQUIRED) diff --git a/tests/system/resources/catkin_pkgs/python_tests/CMakeLists.txt b/tests/system/resources/catkin_pkgs/python_tests/CMakeLists.txt index 6b37ecaa..3158092a 100644 --- a/tests/system/resources/catkin_pkgs/python_tests/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/python_tests/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(python_tests) find_package(catkin REQUIRED) diff --git a/tests/system/resources/catkin_pkgs/python_tests_err/CMakeLists.txt b/tests/system/resources/catkin_pkgs/python_tests_err/CMakeLists.txt index a095f571..eee81aec 100644 --- a/tests/system/resources/catkin_pkgs/python_tests_err/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/python_tests_err/CMakeLists.txt @@ -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) diff --git a/tests/system/resources/catkin_pkgs/python_tests_targets/CMakeLists.txt b/tests/system/resources/catkin_pkgs/python_tests_targets/CMakeLists.txt index 4e349acd..cf35d4f4 100644 --- a/tests/system/resources/catkin_pkgs/python_tests_targets/CMakeLists.txt +++ b/tests/system/resources/catkin_pkgs/python_tests_targets/CMakeLists.txt @@ -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) diff --git a/tests/system/resources/cmake_pkgs/app_pkg/CMakeLists.txt b/tests/system/resources/cmake_pkgs/app_pkg/CMakeLists.txt index 7e230479..2d728070 100644 --- a/tests/system/resources/cmake_pkgs/app_pkg/CMakeLists.txt +++ b/tests/system/resources/cmake_pkgs/app_pkg/CMakeLists.txt @@ -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) diff --git a/tests/system/resources/cmake_pkgs/cmake_pkg/CMakeLists.txt b/tests/system/resources/cmake_pkgs/cmake_pkg/CMakeLists.txt index bbcf8764..e95198d9 100644 --- a/tests/system/resources/cmake_pkgs/cmake_pkg/CMakeLists.txt +++ b/tests/system/resources/cmake_pkgs/cmake_pkg/CMakeLists.txt @@ -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) @@ -7,4 +7,3 @@ install(TARGETS vanilla RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib/static) - diff --git a/tests/system/resources/cmake_pkgs/lib_pkg/CMakeLists.txt b/tests/system/resources/cmake_pkgs/lib_pkg/CMakeLists.txt index c421623b..2a0fd164 100644 --- a/tests/system/resources/cmake_pkgs/lib_pkg/CMakeLists.txt +++ b/tests/system/resources/cmake_pkgs/lib_pkg/CMakeLists.txt @@ -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 diff --git a/tests/system/resources/cmake_pkgs/test_err_pkg/CMakeLists.txt b/tests/system/resources/cmake_pkgs/test_err_pkg/CMakeLists.txt index b68158d5..fa51aebb 100644 --- a/tests/system/resources/cmake_pkgs/test_err_pkg/CMakeLists.txt +++ b/tests/system/resources/cmake_pkgs/test_err_pkg/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(test_err_pkg) include(CTest) diff --git a/tests/system/resources/cmake_pkgs/test_pkg/CMakeLists.txt b/tests/system/resources/cmake_pkgs/test_pkg/CMakeLists.txt index b55a2b25..2908e4e2 100644 --- a/tests/system/resources/cmake_pkgs/test_pkg/CMakeLists.txt +++ b/tests/system/resources/cmake_pkgs/test_pkg/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.5) project(test_pkg) include(CTest) diff --git a/tests/system/resources/ros_pkgs/pkg_with_roslint/CMakeLists.txt b/tests/system/resources/ros_pkgs/pkg_with_roslint/CMakeLists.txt index bf01b7f6..c7dfd01a 100644 --- a/tests/system/resources/ros_pkgs/pkg_with_roslint/CMakeLists.txt +++ b/tests/system/resources/ros_pkgs/pkg_with_roslint/CMakeLists.txt @@ -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() diff --git a/tests/system/workspace_factory.py b/tests/system/workspace_factory.py index a0d9bac6..47b4ce43 100644 --- a/tests/system/workspace_factory.py +++ b/tests/system/workspace_factory.py @@ -52,13 +52,13 @@ class Package(object): """ 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)"""