From 6f04e4ca46e6f2dcd3eda63529a1bbd915f7676b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 28 Dec 2018 03:02:57 +0100 Subject: clang-tidy fixes only Maybe global `-Wcomma' is too harsh. There should be no functional changes whatsoever. --- cmake/opentrack-boilerplate.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cmake') diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 40f65474..62b256e9 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -207,8 +207,14 @@ function(otr_module n_) otr_compat(${n}) - if(CMAKE_COMPILER_IS_CLANG AND (arg_EXECUTABLE OR (NOT arg_BIN AND NOT arg_STATIC))) - set_property(TARGET "${n}" APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-weak-vtables ") + if(CMAKE_COMPILER_IS_CLANGXX AND (arg_EXECUTABLE OR NOT arg_BIN)) + set(opts + weak-vtables + header-hygiene + ) + foreach(k ${opts}) + set_property(TARGET "${n}" APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-${k} ") + endforeach() endif() if(NOT arg_NO-INSTALL) -- cgit v1.2.3