From 401e71a7d825048363dcea710ec1a8184e1def9c Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Mon, 6 Nov 2023 16:00:09 +0100 Subject: [PATCH] Add an option for using clang format and set it to off by default (#509) * Add an option for using clang-format and turn it off by default * Test the non-default clang-format option in CI --------- Co-authored-by: jmcarcell Co-authored-by: tmadlener --- .github/workflows/test.yml | 1 + CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b30009df..c181cba67 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,7 @@ jobs: -DCMAKE_CXX_STANDARD=${{ matrix.CXX_STANDARD }} \ -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always -Werror -Wno-error=deprecated-declarations " \ -DUSE_EXTERNAL_CATCH2=OFF \ + -DPODIO_USE_CLANG_FORMAT=AUTO \ -G Ninja .. echo "::endgroup::" echo "::group::Build" diff --git a/CMakeLists.txt b/CMakeLists.txt index 270d5e05b..e2376e4cf 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,7 @@ option(CREATE_DOC "Whether or not to create doxygen doc target." OFF) option(ENABLE_SIO "Build SIO I/O support" OFF) option(PODIO_RELAX_PYVER "Do not require exact python version match with ROOT" OFF) option(ENABLE_RNTUPLE "Build with support for the new ROOT NTtuple format" OFF) +option(PODIO_USE_CLANG_FORMAT "Use clang-format to format the code" OFF) #--- Declare ROOT dependency ---------------------------------------------------