|author||Luboš Luňák <firstname.lastname@example.org>||2019-09-22 20:28:38 +0200|
|committer||Luboš Luňák <email@example.com>||2019-10-04 08:59:13 +0200|
support reusing PCH if linktarget has additional reasonable defines
Where reasonable means they are from a list of defines known not to affect the system headers, and so they are safe to differ from how the PCH was built. A bit hackish, but works in practice. Change-Id: Ia00d2e4c56212aca05ba9d47abbb0d253998219f Reviewed-on: https://gerrit.libreoffice.org/79364 Tested-by: Jenkins Reviewed-by: Luboš Luňák <firstname.lastname@example.org>
Diffstat (limited to 'pch')
1 files changed, 29 insertions, 0 deletions
diff --git a/pch/inc/clangfix.hxx b/pch/inc/clangfix.hxx
new file mode 100644
@@ -0,0 +1,29 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+ * This file is part of the LibreOffice project.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+// This is a bit lame, but when using -DMACRO that wasn't present when the PCH was built,
+// Clang suddenly subjects it to the -Wunused-macros check, which isn't the case otherwise.
+// And many of these macros are not actually used. So use them here to silence the warnings.
+// See gb_PrecompiledHeader_ignore_flags_system in solenv/gbuild/PrecompiledHeaders.mk .
+#endif // __clang__
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */