This is an automated email from the ASF dual-hosted git repository. lordgamez pushed a commit to branch MINIFICPP-2458 in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 45b99ee17a104d85036866c64c2e3f1c665625ed Author: Gabor Gyimesi <[email protected]> AuthorDate: Tue Aug 26 10:07:30 2025 +0200 Fix clang tidy issues --- cmake/Jsoncons.cmake | 12 +++++++++--- thirdparty/jsoncons/disable-clang-tidy.patch | 13 +++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/cmake/Jsoncons.cmake b/cmake/Jsoncons.cmake index 82ae6d2ff..edf3e281d 100644 --- a/cmake/Jsoncons.cmake +++ b/cmake/Jsoncons.cmake @@ -19,9 +19,15 @@ include(FetchContent) set(JSONCONS_BUILD_TESTS OFF CACHE BOOL "" FORCE) +set(PATCH_FILE "${CMAKE_SOURCE_DIR}/thirdparty/jsoncons/disable-clang-tidy.patch") +set(PC ${Bash_EXECUTABLE} -c "set -x &&\ + (\\\"${Patch_EXECUTABLE}\\\" -p1 -R -s -f --dry-run -i \\\"${PATCH_FILE}\\\" || \\\"${Patch_EXECUTABLE}\\\" -p1 -N -i \\\"${PATCH_FILE}\\\")") + FetchContent_Declare(jsoncons - URL https://github.com/danielaparker/jsoncons/archive/refs/tags/v1.3.2.tar.gz - URL_HASH SHA256=f22fb163df1a12c2f9ee5f95cad9fc37c6cfbefe0ae6f30aba7440832ef70fbe - ) + URL https://github.com/danielaparker/jsoncons/archive/refs/tags/v1.3.2.tar.gz + URL_HASH SHA256=f22fb163df1a12c2f9ee5f95cad9fc37c6cfbefe0ae6f30aba7440832ef70fbe + PATCH_COMMAND "${PC}" + SYSTEM +) FetchContent_MakeAvailable(jsoncons) diff --git a/thirdparty/jsoncons/disable-clang-tidy.patch b/thirdparty/jsoncons/disable-clang-tidy.patch new file mode 100644 index 000000000..7c5e96d17 --- /dev/null +++ b/thirdparty/jsoncons/disable-clang-tidy.patch @@ -0,0 +1,13 @@ +diff --git a/include/jsoncons_ext/jsonpath/token_evaluator.hpp b/include/jsoncons_ext/jsonpath/token_evaluator.hpp +index 1d848b2e7..5fe04084e 100644 +--- a/include/jsoncons_ext/jsonpath/token_evaluator.hpp ++++ b/include/jsoncons_ext/jsonpath/token_evaluator.hpp +@@ -177,7 +177,7 @@ namespace jsonpath { + + inline result_options operator|(result_options a, result_options b) + { +- return static_cast<result_options>(static_cast<unsigned int>(a) | static_cast<unsigned int>(b)); ++ return static_cast<result_options>(static_cast<unsigned int>(a) | static_cast<unsigned int>(b)); // NOLINT(clang-analyzer-optin.core.EnumCastOutOfRange) + } + + inline result_options operator&=(result_options& a, result_options b)
