summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-boilerplate.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/opentrack-boilerplate.cmake')
-rw-r--r--cmake/opentrack-boilerplate.cmake10
1 files changed, 8 insertions, 2 deletions
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)