Created
December 12, 2023 04:24
-
-
Save theoparis/5a1e21a3408f06d1c5d8f6ac6784bc7c to your computer and use it in GitHub Desktop.
standards.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | |
add_compile_options( | |
-Weverything | |
) | |
file(GLOB_RECURSE ALL_SOURCE_FILES *.cpp *.c *.hpp *.h) | |
add_custom_target( | |
clang_tidy | |
COMMAND clang-tidy ${ALL_SOURCE_FILES} -p build -checks='cppcoreguidelines-*' | |
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} | |
) | |
add_custom_target( | |
clang_tidy_fix | |
COMMAND clang-tidy -fix-errors ${ALL_SOURCE_FILES} -p build -checks='cppcoreguidelines-*' | |
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment