Skip to content

Commit

Permalink
CMake: fix tool targets
Browse files Browse the repository at this point in the history
  • Loading branch information
zakaria-fadli-netatmo committed Nov 10, 2024
1 parent 2adc577 commit 5e8be52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ file(GLOB_RECURSE
############################################################

# Add clang-tidy to the project
find_program(CLANG_TIDY_EXE NAMES "clang-tidy-17")
find_program(CLANG_TIDY_EXE NAMES "clang-tidy-20")

if(CLANG_TIDY_EXE)
message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
Expand Down Expand Up @@ -164,7 +164,7 @@ endif()

# Add clang-format to the project only if version >= 17
# using --version
find_program(CLANG_FORMAT "clang-format-17")
find_program(CLANG_FORMAT "clang-format-20")

if(CLANG_FORMAT)
message(STATUS "clang-format found: ${CLANG_FORMAT}")
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ build-debug:
build-release:
cmake --build --preset default-build --config Release $(VERBOSE_FLAG) $(DRY_RUN_FLAG)

%:
cmake --build --preset default-build --config Release $(VERBOSE_FLAG) $(DRY_RUN_FLAG) -t $@

# Run target in Debug configuration by default
OUTPUT_BIN := $(BUILD_DIR)/Debug/my_template_binary

Expand Down

0 comments on commit 5e8be52

Please sign in to comment.