Set up linter

This commit is contained in:
2024-12-25 18:08:55 +00:00
parent 5c49bb98ce
commit 69b958d393
3 changed files with 11 additions and 0 deletions

View File

@@ -5,6 +5,8 @@ project(epec-mcu-emulator LANGUAGES C)
option(TESTS "Build unit tests" ON)
option(WERROR "Treat warnings as errors" OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
macro(set_default_target_options target)
set_property(TARGET ${target} PROPERTY C_STANDARD 11)
set_property(TARGET ${target} PROPERTY C_EXTENSIONS OFF)
@@ -22,6 +24,10 @@ add_custom_target(check-format
COMMAND sh ${CMAKE_SOURCE_DIR}/scripts/check-format.sh
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_custom_target(lint
COMMAND sh ${CMAKE_SOURCE_DIR}/scripts/lint.sh
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
add_subdirectory(engine)