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 <[email protected]>:
>
>> On Wed, Oct 26, 2016 at 11:27 AM, Roman Wüger <[email protected]> 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?
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers