yadro-task/CMakeLists.txt
erius e16a1a6f6e Integrated clang-tidy into cmake
Enabled warnings as errors when building project target
Changed checks for clang-tidy
Changed indentation from 2 spaces to 4 in clang-format
Added pre-commit hook to apply clang-format formatting to the source tree
2024-10-23 14:41:12 +03:00

21 lines
509 B
CMake

cmake_minimum_required(VERSION 3.5)
project(yadro-task VERSION 0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# clang-tidy
find_program(CLANG_TIDY_EXE NAMES clang-tidy REQUIRED)
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE})
file(GLOB SOURCES src/*.cpp)
add_executable(${PROJECT_NAME} ${SOURCES})
target_include_directories(${PROJECT_NAME}
PRIVATE
${PROJECT_SOURCE_DIR}/include
)
set_property(TARGET ${PROJECT_NAME} PROPERTY COMPILE_WARNINGS_AS_ERRORS ON)