diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d5da3505..f8b794ab 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,3 +1,3 @@ -FROM ghcr.io/philips-software/amp-devcontainer-cpp:6.10.3@sha256:e1f388179dbeabaddcdd37b8b563ed89ca3cd36dcf158aa2e5c4f70eb513efec +FROM ghcr.io/philips-software/amp-devcontainer-cpp:7.2.0@sha256:1afa82f415104fd36c8af65740872fd01685275c2e1620f8133c35b3fbff0590 HEALTHCHECK NONE diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2f12575..77cb2154 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: build-in-devcontainer: name: Devcontainer Build runs-on: [ubuntu-latest] - container: ghcr.io/philips-software/amp-devcontainer-cpp:6.10.3@sha256:e1f388179dbeabaddcdd37b8b563ed89ca3cd36dcf158aa2e5c4f70eb513efec + container: ghcr.io/philips-software/amp-devcontainer-cpp:7.2.0@sha256:1afa82f415104fd36c8af65740872fd01685275c2e1620f8133c35b3fbff0590 strategy: matrix: target: [Host, Windows] @@ -56,7 +56,7 @@ jobs: issues: read checks: write pull-requests: write - container: ghcr.io/philips-software/amp-devcontainer-cpp:6.10.3@sha256:e1f388179dbeabaddcdd37b8b563ed89ca3cd36dcf158aa2e5c4f70eb513efec + container: ghcr.io/philips-software/amp-devcontainer-cpp:7.2.0@sha256:1afa82f415104fd36c8af65740872fd01685275c2e1620f8133c35b3fbff0590 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: hendrikmuhs/ccache-action@33522472633dbd32578e909b315f5ee43ba878ce # v1.2.22 diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index c9f89cce..cff6de86 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -18,7 +18,7 @@ jobs: sonar: name: SonarCloud runs-on: ubuntu-latest - container: ghcr.io/philips-software/amp-devcontainer-cpp:6.10.3@sha256:e1f388179dbeabaddcdd37b8b563ed89ca3cd36dcf158aa2e5c4f70eb513efec + container: ghcr.io/philips-software/amp-devcontainer-cpp:7.2.0@sha256:1afa82f415104fd36c8af65740872fd01685275c2e1620f8133c35b3fbff0590 env: SONAR_SERVER_URL: "https://sonarcloud.io" steps: @@ -66,7 +66,7 @@ jobs: codeql: name: CodeQL runs-on: ubuntu-latest - container: ghcr.io/philips-software/amp-devcontainer-cpp:6.10.3@sha256:e1f388179dbeabaddcdd37b8b563ed89ca3cd36dcf158aa2e5c4f70eb513efec + container: ghcr.io/philips-software/amp-devcontainer-cpp:7.2.0@sha256:1afa82f415104fd36c8af65740872fd01685275c2e1620f8133c35b3fbff0590 permissions: security-events: write steps: diff --git a/cucumber_cpp/library/BodyMacro.hpp b/cucumber_cpp/library/BodyMacro.hpp index 203403e6..4790fa55 100644 --- a/cucumber_cpp/library/BodyMacro.hpp +++ b/cucumber_cpp/library/BodyMacro.hpp @@ -31,15 +31,20 @@ namespace cucumber_cpp::library::detail { cucumber_cpp::library::support::SetUpTearDownWrapper wrapper{ *static_cast(this) }; - // IILE to extract the argument types from the `Base::ExecuteImpl` function - [this, &args](void (Base::* /* unused */)(TArgs...)) - { - // IILE to call `Base::ExecuteImpl` with each argument transformed using `TransformArg` - [this, &args](std::index_sequence /*unused*/) - { - static_cast(this)->ExecuteImpl(TransformArg>(args[I].converterName, args[I].converterArgs)...); - }(std::make_index_sequence{}); - }(&Base::ExecuteImpl); + ExecuteImpl(&Base::ExecuteImpl, args); + } + + private: + template + void ExecuteImpl(void (Base::* /*unused*/)(TArgs...), const util::ExecuteArgs& args) + { + ExecuteImpl(args, std::index_sequence_for{}); + } + + template + void ExecuteImpl(const util::ExecuteArgs& args, std::index_sequence /*unused*/) + { + static_cast(this)->ExecuteImpl(TransformArg>(args[I].converterName, args[I].converterArgs)...); } }; } diff --git a/external/cucumber/gherkin/CMakeLists.txt b/external/cucumber/gherkin/CMakeLists.txt index da3b0381..e387d447 100644 --- a/external/cucumber/gherkin/CMakeLists.txt +++ b/external/cucumber/gherkin/CMakeLists.txt @@ -12,3 +12,9 @@ add_subdirectory(${cucumber_gherkin_SOURCE_DIR}/cpp ${cucumber_gherkin_BINARY_DI set_target_properties(cucumber_gherkin_lib PROPERTIES CXX_STANDARD 20) set_target_properties(cucumber_gherkin_bin PROPERTIES CXX_STANDARD 20) set_target_properties(cucumber_gherkin_generate_tokens_bin PROPERTIES CXX_STANDARD 20) + +# Mark cucumber_gherkin_lib include directories as SYSTEM so that deprecation +# warnings in third-party headers (e.g. std::wstring_convert in utils.hpp) +# are not raised as errors in consuming targets. +get_target_property(_gherkin_includes cucumber_gherkin_lib INTERFACE_INCLUDE_DIRECTORIES) +set_target_properties(cucumber_gherkin_lib PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_gherkin_includes}") diff --git a/external/google/googletest/CMakeLists.txt b/external/google/googletest/CMakeLists.txt index 4c060ab3..0934eba7 100644 --- a/external/google/googletest/CMakeLists.txt +++ b/external/google/googletest/CMakeLists.txt @@ -11,5 +11,15 @@ if(NOT TARGET gtest) FetchContent_MakeAvailable(googletest) set_target_properties(gtest gtest_main gmock gmock_main PROPERTIES FOLDER External/GoogleTest) + + # clang-22 promoted -Wcharacter-conversion to an on-by-default warning + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 22.0.0) + target_compile_options(gtest INTERFACE -Wno-character-conversion) + target_compile_options(gtest_main INTERFACE -Wno-character-conversion) + target_compile_options(gmock INTERFACE -Wno-character-conversion) + target_compile_options(gmock_main INTERFACE -Wno-character-conversion) + endif() + endif() mark_as_advanced(BUILD_GMOCK BUILD_GTEST BUILD_SHARED_LIBS gmock_build_tests gtest_build_samples test_build_tests gtest_disable_pthreads gtest_force_shared_crt gtest_hide_internal_symbols) endif()