Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix cmake min version deprecation warning #761

Merged
merged 2 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
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.10)
project(pkg_with_roslint)
find_package(catkin REQUIRED COMPONENTS roslint)
catkin_package()
Expand Down
7 changes: 4 additions & 3 deletions tests/system/workspace_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,17 @@ class Package(object):
</export>"""

CATKIN_CMAKELISTS_TEMPLATE = """
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.10)
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.10)
project({name})
{find_packages}
add_custom_target(install)"""
install(FILES ${{CMAKE_CURRENT_SOURCE_DIR}}/package.xml DESTINATION share/${{PROJECT_NAME}})
"""

CMAKE_CMAKELISTS_FIND_PACKAGE_TEMPLATE = """
find_package({name})"""
Expand Down