From 6a8d00a37517eb1a9a3c3ccfe1b979619d8a696c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20=C5=81ukawski?= Date: Sat, 23 Dec 2023 23:02:20 +0100 Subject: [PATCH] Use new `SHALLOW` option in BuildOpenRAVE, bump YCM files --- .github/workflows/ci.yml | 4 +- CMakeLists.txt | 8 +- cmake/ycm-modules/BuildOpenRAVE.cmake | 5 +- cmake/ycm-modules/IncludeUrl.cmake | 169 ++++++++++++-------------- cmake/ycm-modules/YCMBootstrap.cmake | 16 +-- 5 files changed, 88 insertions(+), 114 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c324b8e..6efedd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: outputs: should_skip: ${{steps.skip_check.outputs.should_skip}} steps: - - uses: fkirc/skip-duplicate-actions@master + - uses: fkirc/skip-duplicate-actions@v5 id: skip_check with: cancel_others: 'true' @@ -27,7 +27,7 @@ jobs: steps: - name: Check out teo-main - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install dependencies via apt run: sudo apt-get update && sudo apt-get install -qq ccache libeigen3-dev libboost-regex-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libboost-iostreams-dev libboost-date-time-dev libxml2-dev libopencv-dev libpcl-dev intltool libglib2.0-dev libusb-1.0-0-dev libspnav-dev libxwiimote-dev diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c8f151..9738373 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,4 @@ -# Copyright: Universidad Carlos III de Madrid (C) 2017; -# Authors: roboticslab, jgvictores, etc -# CopyPolicy: Released under the terms of the GNU GPL v2.0. - -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.16) project(TEO_MAIN LANGUAGES NONE) @@ -10,7 +6,7 @@ project(TEO_MAIN LANGUAGES NONE) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/ycm-modules) # Find this YCM version on system, bootstrap it if not available. -set(YCM_MINIMUM_VERSION 0.12) +set(YCM_MINIMUM_VERSION 0.16) # Uses YCM's unmerged ExternalProject.cmake module. set(YCM_USE_CMAKE_PROPOSED ON) diff --git a/cmake/ycm-modules/BuildOpenRAVE.cmake b/cmake/ycm-modules/BuildOpenRAVE.cmake index 9148016..ea46916 100644 --- a/cmake/ycm-modules/BuildOpenRAVE.cmake +++ b/cmake/ycm-modules/BuildOpenRAVE.cmake @@ -8,7 +8,6 @@ ycm_ep_helper(OpenRAVE TYPE GIT REPOSITORY rdiankov/openrave.git TAG master # https://github.com/roboticslab-uc3m/installation-guides/issues/56 - CMAKE_CACHE_ARGS "-DOPT_VIDEORECORDING:BOOL=OFF;-DOPT_PYTHON:BOOL=OFF" - GIT_SHALLOW TRUE - GIT_PROGRESS TRUE + CMAKE_CACHE_ARGS "-DOPT_VIDEORECORDING:BOOL=OFF;-DOPT_PYTHON:BOOL=OFF;-DOPT_PYTHON3:BOOL=OFF;-DOPT_FCL_COLLISION:BOOL=OFF;-DOPT_MSGPACK:BOOL=OFF;-DOPT_ENCRYPTION:BOOL=OFF" + SHALLOW TRUE DEPENDS RapidJSON) diff --git a/cmake/ycm-modules/IncludeUrl.cmake b/cmake/ycm-modules/IncludeUrl.cmake index 2ed2be2..841e397 100644 --- a/cmake/ycm-modules/IncludeUrl.cmake +++ b/cmake/ycm-modules/IncludeUrl.cmake @@ -1,92 +1,83 @@ -#.rst: -# IncludeUrl -# ---------- -# -# Adds the :command:`include_url` command that useful to download and include -# other CMake modules from a given url. -# -# .. command:: include_url -# -# Downloads a file from given url and includes it:: -# -# include_url( # Url to be downloaded -# [DESTINATION ] # Where the file will be saved -# [EXPECTED_HASH ] # Verify downloaded file's hash -# [EXPECTED_MD5 ] # Short-hand for "EXPECTED_HASH MD5=sum" -# [DOWNLOAD_ONCE] # Download the file only once -# [DOWNLOAD_ALWAYS] # Download the file every time -# [OPTIONAL] # Do not fail file cannot be included -# [RESULT_VARIABLE ] # The local path for the file included -# [RETRIES ] # Try download times (default 3) -# [QUIET] # Don't print anything -# #--Download arguments----------- -# [INACTIVITY_TIMEOUT ] # Timeout after seconds of inactivity -# [TIMEOUT ] # Timeout after seconds -# [STATUS ] # Download status variable -# [LOG ] # Download log variable -# [SHOW_PROGRESS] # Show download progress -# [TLS_VERIFY ] # Check certificates -# [TLS_CAINFO ] # Custom Certificate Authority file -# #--Include arguments------------ -# [NO_POLICY_SCOPE] # Do not manage a new policy entry -# ) -# -# The ``include_url`` macro downloads a file from given url and includes it. -# It works both in -P script mode and when configuring a CMakeLists.txt file. -# -# If ``DESTINATION`` is specified, the file is saved at the given location with -# the original file name, if ```` is a directory, or with the -# given file name, if ```` is a file name. -# -# The arguments ``EXPECTED_HASH``, ``EXPECTED_MD5`` are used to ensure that the -# file included is the one expected. If the ```` is a local file (i.e. -# starts with ``file://``) the hash check is performed also on the file -# converted to the non-native end-of-line style. See the documentation of the -# :command:`file()` command for further information about these arguments. -# -# If the ``DOWNLOAD_ONCE`` option is specified, the file is not -# downloaded if the file already exists and the hash is correct. -# If the ``DOWNLOAD_ALWAYS`` option is specified, the file is downloaded at -# every CMake execution, and an error is raised on failure. -# If none of these two option is specifies, the default behaviour is to try to -# download the file at every CMake execution, but no error is raised if the -# download fails if a version of the file already exists. This is useful when -# CMake should try to update the file to the latest version, before including -# it. -# -# If the ``OPTIONAL`` option is specified, no error will be caused if for any -# reason the file cannot be downloaded or included. -# If ``RESULT_VARIABLE`` is given, the variable will be set to the full -# filename which has been downloaded and included or NOTFOUND if it failed. -# See the documentation of the :command:`file()` command for further information -# about these arguments. -# -# If the ``RETRIES`` option is specified, the download will be tried -# If the ``QUIET`` option is specified, the command will emit no output. -# -# The arguments ``INACTIVITY_TIMEOUT``, ``TIMEOUT``, ``STATUS``, ``LOG``, -# ``SHOW_PROGRESS``, ``TLS_VERIFY``, and ``TLS_CAINFO`` are passed to the -# :command:`file(DOWNLOAD)` command. See the documentation of the -# :command:`file()` command for a detailed description of these arguments. -# -# The arguments ``NO_POLICY_SCOPE`` is passed to the :command:`include()` -# command. See the documentation of the :command:`include()` and -# :command:`cmake_policy()` commands for a detailed description of this -# argument. - -#============================================================================= -# Copyright 2013-2015 Istituto Italiano di Tecnologia (IIT) -# Copyright 2013-2015 Daniele E. Domenichelli -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) +# SPDX-FileCopyrightText: 2012-2021 Istituto Italiano di Tecnologia (IIT) +# SPDX-FileCopyrightText: 2013-2015 Daniele E. Domenichelli +# SPDX-License-Identifier: BSD-3-Clause + +#[=======================================================================[.rst: +IncludeUrl +---------- + +Adds the :command:`include_url` command that useful to download and include +other CMake modules from a given url. + +.. command:: include_url + +Downloads a file from given url and includes it:: + + include_url( # Url to be downloaded + [DESTINATION ] # Where the file will be saved + [EXPECTED_HASH ] # Verify downloaded file's hash + [EXPECTED_MD5 ] # Short-hand for "EXPECTED_HASH MD5=sum" + [DOWNLOAD_ONCE] # Download the file only once + [DOWNLOAD_ALWAYS] # Download the file every time + [OPTIONAL] # Do not fail file cannot be included + [RESULT_VARIABLE ] # The local path for the file included + [RETRIES ] # Try download times (default 3) + [QUIET] # Don't print anything + #--Download arguments----------- + [INACTIVITY_TIMEOUT ] # Timeout after seconds of inactivity + [TIMEOUT ] # Timeout after seconds + [STATUS ] # Download status variable + [LOG ] # Download log variable + [SHOW_PROGRESS] # Show download progress + [TLS_VERIFY ] # Check certificates + [TLS_CAINFO ] # Custom Certificate Authority file + #--Include arguments------------ + [NO_POLICY_SCOPE] # Do not manage a new policy entry + ) + +The ``include_url`` macro downloads a file from given url and includes it. +It works both in -P script mode and when configuring a CMakeLists.txt file. + +If ``DESTINATION`` is specified, the file is saved at the given location with +the original file name, if ```` is a directory, or with the +given file name, if ```` is a file name. + +The arguments ``EXPECTED_HASH``, ``EXPECTED_MD5`` are used to ensure that the +file included is the one expected. If the ```` is a local file (i.e. +starts with ``file://``) the hash check is performed also on the file +converted to the non-native end-of-line style. See the documentation of the +:command:`file()` command for further information about these arguments. + +If the ``DOWNLOAD_ONCE`` option is specified, the file is not +downloaded if the file already exists and the hash is correct. +If the ``DOWNLOAD_ALWAYS`` option is specified, the file is downloaded at +every CMake execution, and an error is raised on failure. +If none of these two option is specifies, the default behaviour is to try to +download the file at every CMake execution, but no error is raised if the +download fails if a version of the file already exists. This is useful when +CMake should try to update the file to the latest version, before including +it. + +If the ``OPTIONAL`` option is specified, no error will be caused if for any +reason the file cannot be downloaded or included. +If ``RESULT_VARIABLE`` is given, the variable will be set to the full +filename which has been downloaded and included or NOTFOUND if it failed. +See the documentation of the :command:`file()` command for further information +about these arguments. + +If the ``RETRIES`` option is specified, the download will be tried +If the ``QUIET`` option is specified, the command will emit no output. + +The arguments ``INACTIVITY_TIMEOUT``, ``TIMEOUT``, ``STATUS``, ``LOG``, +``SHOW_PROGRESS``, ``TLS_VERIFY``, and ``TLS_CAINFO`` are passed to the +:command:`file(DOWNLOAD)` command. See the documentation of the +:command:`file()` command for a detailed description of these arguments. + +The arguments ``NO_POLICY_SCOPE`` is passed to the :command:`include()` +command. See the documentation of the :command:`include()` and +:command:`cmake_policy()` commands for a detailed description of this +argument. +#]=======================================================================] if(DEFINED __INCLUDE_URL_INCLUDED) diff --git a/cmake/ycm-modules/YCMBootstrap.cmake b/cmake/ycm-modules/YCMBootstrap.cmake index 42e033e..47f5abe 100644 --- a/cmake/ycm-modules/YCMBootstrap.cmake +++ b/cmake/ycm-modules/YCMBootstrap.cmake @@ -1,17 +1,5 @@ -#============================================================================= -# Copyright 2013-2014 Istituto Italiano di Tecnologia (IIT) -# Authors: Daniele E. Domenichelli -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of YCM, substitute the full -# License text for the above reference.) - +# SPDX-FileCopyrightText: 2012-2021 Istituto Italiano di Tecnologia (IIT) +# SPDX-License-Identifier: BSD-3-Clause # This module is intentionally kept as small as possible in order to # avoid the spreading of different modules.