HomePhabricator

[CMAKE] Don't enable clang tidy on native builds

Description

[CMAKE] Don't enable clang tidy on native builds

Summary:
By definition, the native builds are not built using the compiler
specified to cmake, but with the system default. This makes it difficult
to use the clang-tidy option for the native builds, since the build
would fail if GCC is the system default.

Test Plan:
With GCC as a system compiler:

cmake -GNinja .. \
  -DCMAKE_C_COMPILER=clang \
  -DCMAKE_CXX_COMPILER=clang++ \
  -DENABLE_CLANG_TIDY=ON
ninja all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D7537

Details

Provenance
FabienAuthored on Sep 23 2020, 11:22
FabienPushed on Sep 23 2020, 14:13
Reviewer
Restricted Project
Differential Revision
D7537: [CMAKE] Don't enable clang tidy on native builds
Parents
rABC558a6c3ccd70: Fix missing braces in validationinterface.cpp
Branches
Unknown
Tags
Unknown