Skip to content

Commit

Permalink
feat: do not enforce building with clang-tidy by default. Linter will…
Browse files Browse the repository at this point in the history
… still be enforced
  • Loading branch information
Taepper committed Jan 23, 2024
1 parent 9d3b8cc commit 7134e45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile_linter
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions build_with_conan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 7134e45

Please sign in to comment.