summaryrefslogtreecommitdiff
path: root/vcl/Library_vclplug_qt5.mk
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2018-12-20 17:10:37 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-12-21 23:04:19 +0100
commitdad7c2213979695cf3573a130309206191b45157 (patch)
tree5ed50f546678c46b235b0f0d215eae5a8b1a6b25 /vcl/Library_vclplug_qt5.mk
parent0a2533aacc2dc98790510fdafd144aad66f231f2 (diff)
workaround to make Qt5 code build with Clang+icecream
Qt5 uses QT_HAS_INCLUDE (which maps to __has_include), and uses it to guard #include <chrono>. Clang's -frewrite-includes, which icecream uses for distributing source to remote nodes, for some reason doesn't recognize __has_include properly when wrapped by this macro, and this all results in strange compile errors related to std::chrono. Change-Id: Ia375ebd928b40ebd51ab4cc59488f3b62939e039 Reviewed-on: https://gerrit.libreoffice.org/65506 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl/Library_vclplug_qt5.mk')
-rw-r--r--vcl/Library_vclplug_qt5.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index d51175756009..f7fbfd1cdbdb 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -118,4 +118,12 @@ $(eval $(call gb_Library_add_libs,vclplug_qt5,\
))
endif
+# Workaround for clang+icecream (clang's -frewrite-includes
+# doesn't handle Qt5's QT_HAS_INCLUDE that Qt5 uses for <chrono>).
+ifeq ($(COM_IS_CLANG),TRUE)
+$(eval $(call gb_Library_add_defs,vclplug_qt5, \
+ -include chrono \
+))
+endif
+
# vim: set noet sw=4 ts=4: