From 7134e45ae2c66acb0e53ac433a187cdc4e2ccefa Mon Sep 17 00:00:00 2001 From: Alexander Taepper Date: Tue, 23 Jan 2024 14:04:03 +0100 Subject: [PATCH] feat: do not enforce building with clang-tidy by default. Linter will still be enforced --- CMakeLists.txt | 2 +- Dockerfile_linter | 2 +- build_with_conan.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b78cf11b..4149076c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,7 @@ list(REMOVE_ITEM SRC_SILO_API ${SRC_TEST}) # Linter # --------------------------------------------------------------------------- -option(BUILD_WITH_CLANG_TIDY "Build process clang-tidy" ON) +option(BUILD_WITH_CLANG_TIDY "Build process clang-tidy") if (NOT CMAKE_BUILD_TYPE STREQUAL Release AND BUILD_WITH_CLANG_TIDY) find_program(CLANG_TIDY_EXE NAMES clang-tidy-18) if (NOT CLANG_TIDY_EXE) diff --git a/Dockerfile_linter b/Dockerfile_linter index c4c732ad1..30f8489cd 100644 --- a/Dockerfile_linter +++ b/Dockerfile_linter @@ -30,4 +30,4 @@ RUN cp -R /root/.conan2_persisted /root/.conan2 && cp -R build_persisted build COPY . ./ -RUN python3 ./build_with_conan.py --parallel 4 +RUN python3 ./build_with_conan.py --parallel 4 --build_with_clang_tidy diff --git a/build_with_conan.py b/build_with_conan.py index 3b5d01df0..337513e23 100755 --- a/build_with_conan.py +++ b/build_with_conan.py @@ -23,8 +23,8 @@ def main(args): cmake_options = [] conan_options = [] - if args.build_without_clang_tidy: - cmake_options.append("-D BUILD_WITH_CLANG_TIDY=OFF") + if args.build_with_clang_tidy: + cmake_options.append("-D BUILD_WITH_CLANG_TIDY=ON") if args.release: cmake_options.append("-D CMAKE_BUILD_TYPE=Release") @@ -64,7 +64,7 @@ def main(args): parser = argparse.ArgumentParser() parser.add_argument("--clean", action="store_true", help="Clean build directory before building") parser.add_argument("--release", action="store_true", help="Trigger RELEASE build") - parser.add_argument("--build_without_clang_tidy", action="store_true", help="Build without clang-tidy") + parser.add_argument("--build_with_clang_tidy", action="store_true", help="Build with clang-tidy") parser.add_argument("--parallel", type=int, default=16, help="Number of parallel jobs") args_parsed = parser.parse_args()