blender/build_files/cmake
Sergey Sharybin 9ea5469178 Initial support of clang-tidy toolchain
Clang Tidy is a Clang based "linter" tool which goal is to help
fixing typical programming errors.

It is run as a separate compile step of every file, which slows
compilation down but allows to fully analyze the file the same
way as compiler does and catch non-trivial bugprone cases.

This change includes:

- CMake option called `WITH_CLANG_TIDY` which enables Clang Tidy
  linter tool on all source in the `source/` directory.

  This option is only available on Linux, as it is currently the
  easiest platform to get the Clang Tidy toolchain to work.

- CMake module which is aimed to find latest available Clang Tidy.

- Set of rules which allows to have Blender fully compiled without
  extra issues.

The goal of this change is to provide a base ground so that solving
all the warnings can happen later on, as a team effort.

It should be possible to use Clang Tidy side-by-side with both GCC
and Clang, but there seems to be some tweaks to be done in CMake to
make it really work for Blender. For now use Clang toolchain if
there are issues with GCC+Clang Tidy.

It will be worked on in the nearest future to bring seamless
experience for all configurations.

Currently there is no official way of getting Clang Tidy on macOS,
and on Windows there are some difficulties of hooking up Clang Tidy
from LLVM package to the MSVC compiler toolchain.

The actual warnings in the code will be addressed as a part of the
Code Quality Days, task T78535.

Differential Revision: https://developer.blender.org/D7937
2020-07-03 09:57:41 +02:00
..
config Fix missing WITH_CYCLES_EMBREE in the build configurations 2020-06-24 15:51:08 +02:00
example_scripts Cleanup: remove make wrapper 2019-01-24 23:25:18 +11:00
Modules Initial support of clang-tidy toolchain 2020-07-03 09:57:41 +02:00
platform Build: upgrade OpenImageDenoise to 1.2.1 2020-06-25 13:00:58 +02:00
buildinfo.cmake Use cmake TIMESTAMP for BUILD_DATE+TIME 2019-09-18 23:04:23 +02:00
clang_array_check.py Fix wrong glColor3usv array size check in clang array checker 2020-02-04 17:54:51 +01:00
cmake_consistency_check_config.py CMake: update cmake_consistency_check 2019-10-29 03:46:50 +11:00
cmake_consistency_check.py CMake: update cmake_consistency_check 2019-10-29 03:46:50 +11:00
cmake_netbeans_project.py Spelling fixes in comments and descriptions, patch by luzpaz 2019-07-31 14:27:35 +02:00
cmake_print_build_options.py Cleanup: move 'make help_features' into own file 2018-09-13 16:20:02 +10:00
cmake_qtcreator_project.py Cleanup: remove contributors for Python files 2019-02-05 09:17:00 +11:00
cmake_static_check_clang_array.py Cleanup: remove contributors for Python files 2019-02-05 09:17:00 +11:00
cmake_static_check_cppcheck.py Cleanup: remove contributors for Python files 2019-02-05 09:17:00 +11:00
cmake_static_check_smatch.py Cleanup: remove contributors for Python files 2019-02-05 09:17:00 +11:00
cmake_static_check_sparse.py Cleanup: remove contributors for Python files 2019-02-05 09:17:00 +11:00
cmake_static_check_splint.py Cleanup: remove contributors for Python files 2019-02-05 09:17:00 +11:00
macros.cmake Alembic: remove HDF5 support from CMake files 2020-06-15 11:58:58 +02:00
packaging.cmake Blender: change bugfix release versioning from a/b/c to .1/.2/.3 2020-05-29 17:48:26 +02:00
project_info.py Cleanup: remove contributors for Python files 2019-02-05 09:17:00 +11:00
project_source_info.py Cleanup: remove contributors for Python files 2019-02-05 09:17:00 +11:00
RpmBuild.cmake Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00