[CMake] [cmake-developers] iwyu and clang-tidy not working under mac os

Roman Wüger roman.wueger at gmx.at
Wed Oct 26 14:27:12 EDT 2016


Ok, I've got it.
If anyone is interested, here is my configuration:
find_program(iwyu_path NAMES include-what-you-use iwyu PATHS ${CMAKE_SOURCE_DIR}/tools/include-what-you-use/${iwyu_os}/bin) if(NOT iwyu_path) message(STATUS "Program include-what-you-use: Not found") else() message(STATUS "Program include-what-you-use: Found") set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${iwyu_path}) endif() find_program(clang_tidy NAMES clang-tidy clang-tidy-3.8) if(NOT clang_tidy) message(STATUS "Program clang-tidy: Not found") else() message(STATUS "Program clang-tidy: Found") set(CMAKE_CXX_CLANG_TIDY "${clang_tidy};-checks=-*,clang-analyzer-*,-clang-analyzer-alpha*,performance-*,cppcoreguidelines-*,cert-*,modernize-*") endif() 

Regards
Roman

> Am 26.10.2016 um 11:50 schrieb Daniel Pfeifer <daniel at pfeifer-mail.de>:
> 
>> On Wed, Oct 26, 2016 at 11:27 AM, Roman Wüger <roman.wueger at gmx.at> wrote:
>> Hello,
>> 
>> I set CMAKE_CXX_INCLUDE_WHAT_YOU_USE and CMAKE_CXX_CLANG_TIDY. Both work as expected with CMake 3.6.2 under linux. Under Mac OS with the same sources and the same CMake version doesn't produce any output.
>> 
>> On Linux clang 3.8 is used, on Mac OS it is AppleClang 7.3.0 with clang-tidy installed from homebrew.
>> 
>> Any hints?
> 
> When you run "make VERBOSE=1" and look at what is executed, do you see any "cmake --iwyu" invocations?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161026/6a259dcf/attachment.html>


More information about the CMake mailing list