Add separate toolchain with clang-tidy support.

This commit is contained in:
Alexander Shaduri
2021-03-05 14:19:45 +04:00
parent cb42040a8d
commit 60d9bf1922
3 changed files with 21 additions and 45 deletions
-41
View File
@@ -1,41 +0,0 @@
###############################################################################
# License: BSD Zero Clause License file
# Copyright:
# (C) 2021 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
# Linux development version with gcc, debug mode.
# Use with:
# cmake -DCMAKE_TOOLCHAIN_FILE=...
set(CMAKE_SYSTEM_NAME Linux)
# Specify the compiler
set(CMAKE_C_COMPILER gcc-9)
set(CMAKE_CXX_COMPILER g++-9)
# Common options for gcc/clang
include(${CMAKE_CURRENT_LIST_DIR}/common-gcc-clang.cmake)
# Common options for development
include(${CMAKE_CURRENT_LIST_DIR}/common-dev.cmake)
# gcc-specific options
add_compile_options(
-Wnoexcept
-Wsuggest-attribute=const
-Wsuggest-attribute=noreturn
-Wsuggest-attribute=format
-Wsuggest-final-methods
-Wsuggest-override
-Wno-virtual-move-assign
-Wdate-time
-Wtrampolines
-Wlogical-op
-Wduplicated-cond
-Wnormalized
-Wextra-semi
-Wcatch-value
-Wno-virtual-move-assign
)
+16
View File
@@ -0,0 +1,16 @@
###############################################################################
# License: BSD Zero Clause License file
# Copyright:
# (C) 2021 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
# Developer options
set(APP_COMPILER_ENABLE_WARNINGS ON)
set(APP_BUILD_EXAMPLES ON)
set(APP_BUILD_TESTS ON)
# Enable clang-tidy by default, reading from <project_root>/.clang-tidy file
set(CMAKE_CXX_CLANG_TIDY "clang-tidy")
+5 -4
View File
@@ -1,7 +1,8 @@
# Enable clang-tidy by default, reading from <project_root>/.clang-tidy file
set(CMAKE_CXX_CLANG_TIDY "clang-tidy")
###############################################################################
# License: BSD Zero Clause License file
# Copyright:
# (C) 2021 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
# Developer options