mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-09-25 05:15:33 +00:00
Add separate toolchain with clang-tidy support.
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user