diff --git a/3rdparty/catch2.cmake b/3rdparty/catch2.cmake index 1429f195..a83581d6 100644 --- a/3rdparty/catch2.cmake +++ b/3rdparty/catch2.cmake @@ -7,10 +7,10 @@ set(_dir "${CMAKE_CURRENT_SOURCE_DIR}/catch2") if(YCM_DOWNLOAD_3RDPARTY) - set(_files extras/Catch.cmake ab6c7375be9a8e71ee84c6f8537113f9f47daf99 - extras/CatchAddTests.cmake ab6c7375be9a8e71ee84c6f8537113f9f47daf99 - extras/ParseAndAddCatchTests.cmake ab6c7375be9a8e71ee84c6f8537113f9f47daf99 - LICENSE.txt ab6c7375be9a8e71ee84c6f8537113f9f47daf99) + set(_files extras/Catch.cmake b54f8d387479caeffb8da540c65dff40e649dd91 + extras/CatchAddTests.cmake 75e59b4c924d7233bc947cad05fb4ee86a784eec + extras/ParseAndAddCatchTests.cmake 021c11738cad3f2139e09b2bb252a44d357bfd34 + LICENSE.txt 3cba29011be2b9d59f6204d6fa0a386b1b2dbd90) set(_ref v3.2.1) _ycm_download(3rdparty-catch2 "Catch2 (C++ Automated Test Cases in a Header) git repository" diff --git a/3rdparty/catch2/README.Catch2 b/3rdparty/catch2/README.Catch2 index 88d1443c..f96b2cc0 100644 --- a/3rdparty/catch2/README.Catch2 +++ b/3rdparty/catch2/README.Catch2 @@ -1,5 +1,5 @@ Some of the files in this folder and its subfolder come from the Catch2 git -repository (ref v2.13.4): +repository (ref v3.2.1): https://github.com/catchorg/Catch2/ diff --git a/3rdparty/cmrc.cmake b/3rdparty/cmrc.cmake index 0426d53e..096d80be 100644 --- a/3rdparty/cmrc.cmake +++ b/3rdparty/cmrc.cmake @@ -7,9 +7,9 @@ set(_dir "${CMAKE_CURRENT_SOURCE_DIR}/cmrc") if(YCM_DOWNLOAD_3RDPARTY) - set(_files CMakeRC.cmake 15109e38dddefce15028a0d0563557b2dc72446a + set(_files CMakeRC.cmake 6f82bf951d9d32c610892b1315ad588dbfc2f8de LICENSE.txt 053245749bccc40304ec4d9d0a47aea0b1c9f8f6) - set(_ref f26f6e35a859b0ba28818dbcc0ed9b3880881cf4) + set(_ref 952ffddba731fc110bd50409e8d2b8a06abbd237) _ycm_download(3rdparty-cmrc "CMakeRC (A Standalone CMake-Based C++ Resource Compiler) git repository" diff --git a/3rdparty/cmrc/CMakeRC.cmake b/3rdparty/cmrc/CMakeRC.cmake index cf7f232a..6a5147ae 100644 --- a/3rdparty/cmrc/CMakeRC.cmake +++ b/3rdparty/cmrc/CMakeRC.cmake @@ -34,7 +34,7 @@ endif() set(_version 2.0.0) -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.12) include(CMakeParseArguments) if(COMMAND cmrc_add_resource_library) @@ -77,6 +77,10 @@ set(hpp_content [==[ #include #include +#if !(defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) || defined(CMRC_NO_EXCEPTIONS)) +#define CMRC_NO_EXCEPTIONS 1 +#endif + namespace cmrc { namespace detail { struct dummy; } } #define CMRC_DECLARE(libid) \ @@ -243,15 +247,15 @@ public: return !(*this == rhs); } - iterator operator++() noexcept { - auto cp = *this; + iterator& operator++() noexcept { ++_base_iter; - return cp; + return *this; } - iterator& operator++(int) noexcept { + iterator operator++(int) noexcept { + auto cp = *this; ++_base_iter; - return *this; + return cp; } }; @@ -339,7 +343,12 @@ public: file open(const std::string& path) const { auto entry_ptr = _get(path); if (!entry_ptr || !entry_ptr->is_file()) { +#ifdef CMRC_NO_EXCEPTIONS + fprintf(stderr, "Error no such file or directory: %s\n", path.c_str()); + abort(); +#else throw std::system_error(make_error_code(std::errc::no_such_file_or_directory), path); +#endif } auto& dat = entry_ptr->as_file(); return file{dat.begin_ptr, dat.end_ptr}; @@ -362,10 +371,20 @@ public: directory_iterator iterate_directory(const std::string& path) const { auto entry_ptr = _get(path); if (!entry_ptr) { +#ifdef CMRC_NO_EXCEPTIONS + fprintf(stderr, "Error no such file or directory: %s\n", path.c_str()); + abort(); +#else throw std::system_error(make_error_code(std::errc::no_such_file_or_directory), path); +#endif } if (!entry_ptr->is_directory()) { +#ifdef CMRC_NO_EXCEPTIONS + fprintf(stderr, "Error not a directory: %s\n", path.c_str()); + abort(); +#else throw std::system_error(make_error_code(std::errc::not_a_directory), path); +#endif } return entry_ptr->as_directory().begin(); } @@ -387,7 +406,7 @@ endif() file(GENERATE OUTPUT "${cmrc_hpp}" CONTENT "${hpp_content}" CONDITION ${_generate}) add_library(cmrc-base INTERFACE) -target_include_directories(cmrc-base INTERFACE "${CMRC_INCLUDE_DIR}") +target_include_directories(cmrc-base INTERFACE $) # Signal a basic C++11 feature to require C++11. target_compile_features(cmrc-base INTERFACE cxx_nullptr) set_property(TARGET cmrc-base PROPERTY INTERFACE_CXX_EXTENSIONS OFF) @@ -566,7 +585,7 @@ function(cmrc_add_resources name) endif() get_filename_component(dirpath "${ARG_PREFIX}${relpath}" DIRECTORY) _cmrc_register_dirs("${name}" "${dirpath}") - get_filename_component(abs_out "${libdir}/intermediate/${relpath}.cpp" ABSOLUTE) + get_filename_component(abs_out "${libdir}/intermediate/${ARG_PREFIX}${relpath}.cpp" ABSOLUTE) # Generate a symbol name relpath the file's character array _cm_encode_fpath(sym "${relpath}") # Get the symbol name for the parent directory diff --git a/3rdparty/cmrc/README.CMakeRC b/3rdparty/cmrc/README.CMakeRC index dd1af21f..5a2373e0 100644 --- a/3rdparty/cmrc/README.CMakeRC +++ b/3rdparty/cmrc/README.CMakeRC @@ -1,5 +1,5 @@ Some of the files in this folder and its subfolder come from the CMakeRC git -repository (ref f26f6e35a859b0ba28818dbcc0ed9b3880881cf4): +repository (ref 952ffddba731fc110bd50409e8d2b8a06abbd237): https://github.com/vector-of-bool/cmrc/ diff --git a/CHANGELOG.md b/CHANGELOG.md index ed342ab0..4a2c07a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased Patch] +### Changed + +* Update CMakeRC to latest version as of November 2023 (https://github.com/robotology/ycm/pull/436). + ### Deprecated -Deprecate `OpenCV_LIBRARIES` library set by `find_package(OpenCV)`, downstream users should just use `OpenCV_LIBS` as set by official OpenCV CMake config files (https://github.com/robotology/ycm/pull/434). +* Deprecate `OpenCV_LIBRARIES` library set by `find_package(OpenCV)`, downstream users should just use `OpenCV_LIBS` as set by official OpenCV CMake config files (https://github.com/robotology/ycm/pull/434). ### Removed