CppunitTest_emfio_emf: add some tolerance in TestPdfInEmf
[LibreOffice.git] / bin / gen-boost-headers
blob2f6a6ecc87132a4caa1dfd4b9c29fc42a3459bd6
1 #!/usr/bin/env bash
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 # generate a bunch of dummy headers that wrap the crappy boost headers and
11 # suppress a myriad of warnings; requires GCC's #include_next extension
12 # To run this do: make cmd cmd="bin/gen-boost-headers"
14 set -euo pipefail
15 IFS=$'\n\t'
17 GENDIR=${SRCDIR}/external/boost/include
19 rm -rf ${GENDIR}
20 mkdir ${GENDIR}
22 # note: clucene contains a copy of half of boost, so ignore it too
23 # note: firebird contains a copy of half of boost, so ignore it too
25 cat <(cd ${SRCDIR} && git grep -h '^# *include') \
26 <(find ${WORKDIR}/UnpackedTarball/ -mindepth 1 -maxdepth 1 -type d \
27 | grep -v boost \
28 | grep -v clucene \
29 | grep -v firebird \
30 | xargs grep -hr '^# *include') \
31 | grep -o '\bboost.*\.\(h\|hpp\|ipp\)' \
32 | sort | uniq \
33 | while read -r HEADER; do
34 mkdir -p "$(dirname ${GENDIR}/${HEADER})"
35 cat > "${GENDIR}/${HEADER}" << _EOF
36 /* generated by $0, do not edit! */
37 #pragma once
38 #pragma GCC diagnostic push
39 #pragma GCC diagnostic ignored "-Wpragmas" /* first! for GCC */
40 #pragma GCC diagnostic ignored "-Wunknown-warning-option" // second! for Clang 5
41 #pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
42 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
43 #pragma GCC diagnostic ignored "-Wdeprecated-copy"
44 #pragma GCC diagnostic ignored "-Wdeprecated-copy-dtor"
45 #pragma GCC diagnostic ignored "-Wextra"
46 #pragma GCC diagnostic ignored "-Wignored-qualifiers"
47 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
48 #pragma GCC diagnostic ignored "-Winvalid-constexpr"
49 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
50 #pragma GCC diagnostic ignored "-Wmicrosoft-unqualified-friend"
51 #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
52 #pragma GCC diagnostic ignored "-Wnonnull"
53 #pragma GCC diagnostic ignored "-Wparentheses"
54 #pragma GCC diagnostic ignored "-Wplacement-new"
55 #pragma GCC diagnostic ignored "-Wreturn-type"
56 #pragma GCC diagnostic ignored "-Wshadow"
57 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
58 #pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
59 #pragma GCC diagnostic ignored "-Wtype-limits"
60 #pragma GCC diagnostic ignored "-Wundef"
61 #pragma GCC diagnostic ignored "-Wunused-local-typedefs"
62 #pragma GCC diagnostic ignored "-Wunused-macros"
63 #pragma GCC diagnostic ignored "-Wunused-parameter"
64 #pragma GCC diagnostic ignored "-Wunused-variable"
65 #include_next <${HEADER}>
66 #pragma GCC diagnostic pop
67 _EOF
68 done