editorconfig: add setting to trim trailing whitespace

and clean up all outstanding issues

Skip 'test cases/common/141 special characters/meson.build' since it
intentionally uses trailing newlines.
pull/9107/head
Eli Schwartz 4 years ago
parent c2592bc921
commit 59d4f771d2
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 1
      .editorconfig
  2. 1
      cross/iphone.txt
  3. 1
      cross/tvos.txt
  4. 1
      cross/wasm.txt
  5. 1
      data/shell-completions/zsh/_meson
  6. 2
      docs/markdown/Adding-new-projects-to-wrapdb.md
  7. 2
      docs/markdown/Commands.md
  8. 10
      docs/markdown/Getting-meson_ptbr.md
  9. 13
      docs/markdown/Release-notes-for-0.57.0.md
  10. 3
      docs/markdown/Release-notes-for-0.58.0.md
  11. 3
      docs/markdown/Release-notes-for-0.59.0.md
  12. 1
      manual tests/4 standalone binaries/readme.txt
  13. 30
      mesonbuild/backend/xcodebackend.py
  14. 1
      mesonbuild/coredata.py
  15. 4
      mesonbuild/dependencies/pkgconfig.py
  16. 1
      mesonbuild/templates/objcpptemplates.py
  17. 1
      packaging/createpkg.py
  18. 1
      test cases/common/107 spaces backslash/asm output/meson.build
  19. 1
      test cases/common/113 interpreter copy mutable var on assignment/meson.build
  20. 1
      test cases/common/114 skip/meson.build
  21. 1
      test cases/common/115 subproject project arguments/exe.cpp
  22. 1
      test cases/common/13 pch/c/prog.c
  23. 1
      test cases/common/13 pch/generated/prog.c
  24. 1
      test cases/common/13 pch/withIncludeDirectories/prog.c
  25. 1
      test cases/common/13 pch/withIncludeFile/prog.c
  26. 2
      test cases/common/141 special characters/.editorconfig
  27. 1
      test cases/common/147 simd/meson.build
  28. 1
      test cases/common/147 simd/simd_sse2.c
  29. 1
      test cases/common/149 dotinclude/meson.build
  30. 1
      test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/a.c
  31. 2
      test cases/common/167 subproject nested subproject dirs/contrib/subprojects/alpha/var/subprojects/wrap_files_might_be_here
  32. 4
      test cases/common/169 source in dep/generated/meson.build
  33. 1
      test cases/common/176 subproject version/meson.build
  34. 1
      test cases/common/177 subdir_done/meson.build
  35. 1
      test cases/common/230 external project/app.c
  36. 1
      test cases/common/230 external project/func.c
  37. 1
      test cases/common/33 run program/check-env.py
  38. 2
      test cases/common/42 subproject/meson.build
  39. 2
      test cases/common/42 subproject/subprojects/sublib/meson.build
  40. 1
      test cases/common/46 subproject subproject/subprojects/a/a.c
  41. 1
      test cases/common/66 vcstag/meson.build
  42. 1
      test cases/common/66 vcstag/tagprog.c
  43. 1
      test cases/common/66 vcstag/vcstag.c.in
  44. 1
      test cases/common/74 file object/meson.build
  45. 1
      test cases/common/79 same basename/lib.c
  46. 1
      test cases/common/9 header install/meson.build
  47. 1
      test cases/common/9 header install/sub/meson.build
  48. 1
      test cases/cuda/1 simple/meson.build
  49. 1
      test cases/cuda/1 simple/prog.cu
  50. 1
      test cases/cuda/13 cuda compiler setting/meson.build
  51. 2
      test cases/cuda/13 cuda compiler setting/nativefile.ini
  52. 1
      test cases/cuda/13 cuda compiler setting/prog.cu
  53. 1
      test cases/cuda/14 cuda has header symbol/meson.build
  54. 1
      test cases/cuda/15 sanitizer/prog.cu
  55. 1
      test cases/cuda/2 split/lib.cu
  56. 1
      test cases/cuda/2 split/meson.build
  57. 1
      test cases/cuda/2 split/static/lib.cu
  58. 1
      test cases/cuda/2 split/static/libsta.cu
  59. 1
      test cases/cuda/3 cudamodule/meson.build
  60. 1
      test cases/cuda/3 cudamodule/prog.cu
  61. 1
      test cases/cuda/4 shared/shared/kernels.cu
  62. 1
      test cases/cuda/5 threads/shared/kernels.cu
  63. 6
      test cases/d/10 d cpp/cppmain.cpp
  64. 1
      test cases/d/3 shared library/sub/meson.build
  65. 10
      test cases/d/9 features/app.d
  66. 1
      test cases/failing build/3 pch disabled/c/prog.c
  67. 1
      test cases/failing/106 feature require/meson_options.txt
  68. 1
      test cases/failing/26 output subdir/subdir/dummy.txt
  69. 1
      test cases/failing/40 kwarg assign/meson.build
  70. 1
      test cases/failing/44 abs subdir/meson.build
  71. 1
      test cases/failing/52 slashname/meson.build
  72. 1
      test cases/failing/52 slashname/sub/meson.build
  73. 1
      test cases/failing/73 int literal leading zero/meson.build
  74. 3
      test cases/fortran/11 compiles links runs/meson.build
  75. 1
      test cases/fortran/12 submodule/child.f90
  76. 1
      test cases/fortran/2 modules/prog.f90
  77. 2
      test cases/fortran/21 install static/main_lib.f90
  78. 1
      test cases/fpga/1 simple/meson.build
  79. 14
      test cases/fpga/1 simple/spin.v
  80. 1
      test cases/frameworks/1 boost/partial_dep/main.cpp
  81. 1
      test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt
  82. 1
      test cases/frameworks/14 doxygen/doc/meson.build
  83. 1
      test cases/frameworks/14 doxygen/meson.build
  84. 2
      test cases/frameworks/15 llvm/sum.c
  85. 1
      test cases/frameworks/23 hotdoc/doc/sitemap.txt
  86. 1
      test cases/frameworks/23 hotdoc/meson.build
  87. 2
      test cases/frameworks/25 hdf5/main.f90
  88. 1
      test cases/frameworks/4 qt/manualinclude.cpp
  89. 2
      test cases/frameworks/4 qt/meson.build
  90. 1
      test cases/frameworks/6 gettext/data/data3/test.desktop.in
  91. 1
      test cases/frameworks/6 gettext/data/test.desktop.in
  92. 1
      test cases/frameworks/6 gettext/data/test2.desktop.in
  93. 1
      test cases/frameworks/6 gettext/data/test5.desktop.in.in
  94. 1
      test cases/frameworks/6 gettext/data/test6.desktop.in.in
  95. 1
      test cases/frameworks/6 gettext/data2/test.desktop.in
  96. 1
      test cases/frameworks/6 gettext/po/LINGUAS
  97. 2
      test cases/frameworks/8 flex/lexer.l
  98. 1
      test cases/frameworks/8 flex/testfile
  99. 4
      test cases/java/2 subdir/sub/com/mesonbuild/TextPrinter.java
  100. 1
      test cases/java/3 args/meson.build
  101. Some files were not shown because too many files have changed in this diff Show More

@ -4,6 +4,7 @@ root = true
charset = utf-8 charset = utf-8
end_of_line = lf end_of_line = lf
indent_style = space indent_style = space
trim_trailing_whitespace = true
[*.[ch]] [*.[ch]]
indent_size = 4 indent_size = 4

@ -28,4 +28,3 @@ system = 'darwin'
cpu_family = 'aarch64' cpu_family = 'aarch64'
cpu = 'aarch64' cpu = 'aarch64'
endian = 'little' endian = 'little'

@ -25,4 +25,3 @@ system = 'darwin'
cpu_family = 'arm' cpu_family = 'arm'
cpu = 'arm64' cpu = 'arm64'
endian = 'little' endian = 'little'

@ -15,4 +15,3 @@ system = 'emscripten'
cpu_family = 'wasm32' cpu_family = 'wasm32'
cpu = 'wasm32' cpu = 'wasm32'
endian = 'little' endian = 'little'

@ -422,4 +422,3 @@ ret=$?
esac esac
return ret return ret

@ -130,7 +130,7 @@ git commit -a -m 'Add wrap files for libfoo-1.0.0'
git push -u origin libfoo git push -u origin libfoo
``` ```
Now you should create a pull request on GitHub. Now you should create a pull request on GitHub.
If packaging review requires you to do changes, use the `--amend` If packaging review requires you to do changes, use the `--amend`
argument to `commit` so that your branch will have only one commit. argument to `commit` so that your branch will have only one commit.

@ -62,7 +62,7 @@ Builds a default or a specified target of a configured Meson project.
- `NAME`: name of the target from `meson.build` (e.g. `foo` from `executable('foo', ...)`). - `NAME`: name of the target from `meson.build` (e.g. `foo` from `executable('foo', ...)`).
- `PATH`: path to the target relative to the root `meson.build` file. Note: relative path for a target specified in the root `meson.build` is `./`. - `PATH`: path to the target relative to the root `meson.build` file. Note: relative path for a target specified in the root `meson.build` is `./`.
- `TYPE`: type of the target. Can be one of the following: 'executable', 'static_library', 'shared_library', 'shared_module', 'custom', 'run', 'jar'. - `TYPE`: type of the target. Can be one of the following: 'executable', 'static_library', 'shared_library', 'shared_module', 'custom', 'run', 'jar'.
`PATH` and/or `TYPE` can be omitted if the resulting `TARGET` can be `PATH` and/or `TYPE` can be omitted if the resulting `TARGET` can be
used to uniquely identify the target in `meson.build`. used to uniquely identify the target in `meson.build`.

@ -1,6 +1,6 @@
# Obtendo o Meson # Obtendo o Meson
Meson é implementado em Python 3, e requer a versão 3.6 ou mais nova. Meson é implementado em Python 3, e requer a versão 3.6 ou mais nova.
se o seu sistema operacional provê um gerenciador de pacotes, você deve se o seu sistema operacional provê um gerenciador de pacotes, você deve
instalar o Meson com ele. Para plataformas que não tem um gerenciador de instalar o Meson com ele. Para plataformas que não tem um gerenciador de
pacotes, você precisa baixa-lo da [página inicial do Python]. Veja abaixo pacotes, você precisa baixa-lo da [página inicial do Python]. Veja abaixo
@ -26,7 +26,7 @@ plataformas.
O Meson está disponível no [Indice de Pacotes do Python] e pode ser instalado com O Meson está disponível no [Indice de Pacotes do Python] e pode ser instalado com
`sudo pip3 install meson` que requer root e vai instala-lo para todo o sistema. `sudo pip3 install meson` que requer root e vai instala-lo para todo o sistema.
Se você já baixou uma cópia do código do Meson, você pode instalar com Se você já baixou uma cópia do código do Meson, você pode instalar com
`sudo pip3 install path/to/source/root/`. `sudo pip3 install path/to/source/root/`.
Como alternativa, você pode usar o `pip3 install --user meson` que vai instalar Como alternativa, você pode usar o `pip3 install --user meson` que vai instalar
@ -54,7 +54,7 @@ Clang, Visual Studio, MinGW, ICC, ARMCC, etc.
Você deve usar a versão provida pelo seu gerenciador de pacotes se possível, caso contrário, Você deve usar a versão provida pelo seu gerenciador de pacotes se possível, caso contrário,
baixe o binário executável da [página de *release* do projeto Ninja](https://github.com/ninja-build/ninja/releases). baixe o binário executável da [página de *release* do projeto Ninja](https://github.com/ninja-build/ninja/releases).
Se você apenas usa o *backend* do Visual Studio (`--backend=vs`) para gerar soluções do Visual Studio no Windows ou o Se você apenas usa o *backend* do Visual Studio (`--backend=vs`) para gerar soluções do Visual Studio no Windows ou o
*backend* do XCode (`--backend=xcode`) para gerar projetos no macOS, você não precisa do Ninja. *backend* do XCode (`--backend=xcode`) para gerar projetos no macOS, você não precisa do Ninja.
@ -72,7 +72,7 @@ que você selecione as opções do instalador como a seguir:
![passo 3 do instalador](images/py3-install-3.png "Opções Avançadas: ative 'Instalar para todos usuários'") ![passo 3 do instalador](images/py3-install-3.png "Opções Avançadas: ative 'Instalar para todos usuários'")
Com isso, você terá o `python` e o `pip` no `PATH`, e você poderá instalar o Meson com o pip. Você também vai poder Com isso, você terá o `python` e o `pip` no `PATH`, e você poderá instalar o Meson com o pip. Você também vai poder
executar o comando `meson` em qualquer shell no Windows ao invés de ter que executar `py -3` com o caminho completo para executar o comando `meson` em qualquer shell no Windows ao invés de ter que executar `py -3` com o caminho completo para
o *script* `meson.py`. o *script* `meson.py`.
@ -80,7 +80,7 @@ o *script* `meson.py`.
Se você está usando o MSYS2 no Windows como seu ambiente de desenvolvimento, Se você está usando o MSYS2 no Windows como seu ambiente de desenvolvimento,
por favor se certifique que você não esteja usando o pacote `msys/python` para por favor se certifique que você não esteja usando o pacote `msys/python` para
fornecer o Python 3. Uso o `mingw32/mingw-w64-i686-python3` ou o fornecer o Python 3. Uso o `mingw32/mingw-w64-i686-python3` ou o
If you are using MSYS2 on Windows as your development environment, If you are using MSYS2 on Windows as your development environment,
please make sure that you **do not use** the `msys/python` package to please make sure that you **do not use** the `msys/python` package to
provide Python 3. Use either `mingw32/mingw-w64-i686-python3` or `mingw64/mingw-w64-x86_64-python3` provide Python 3. Use either `mingw32/mingw-w64-i686-python3` or `mingw64/mingw-w64-x86_64-python3`

@ -105,7 +105,7 @@ Run Time Checking can be enabled by manually adding `/RTC1` or other RTC flags o
The `debug` buildtype for clang-cl added additional arguments compared to MSVC, which had more to do with optimization than debug. The arguments removed are `/Ob0`, `/Od`, `/RTC1`. (`/Zi` was also removed, but it is already added by default when debug is enabled.) The `debug` buildtype for clang-cl added additional arguments compared to MSVC, which had more to do with optimization than debug. The arguments removed are `/Ob0`, `/Od`, `/RTC1`. (`/Zi` was also removed, but it is already added by default when debug is enabled.)
If these are important issues for you and would like builtin toggle options, If these are important issues for you and would like builtin toggle options,
please file an issue in the Meson bug tracker. please file an issue in the Meson bug tracker.
## Buildtype remains even if dependent options are changed ## Buildtype remains even if dependent options are changed
@ -154,17 +154,17 @@ Currently supports `glib-compile-schemas`, `gio-querymodules`, and
## "Edit and continue" (/ZI) is no longer used by default for Visual Studio ## "Edit and continue" (/ZI) is no longer used by default for Visual Studio
Meson was adding the `/ZI` compiler argument as an argument for Visual Studio Meson was adding the `/ZI` compiler argument as an argument for Visual Studio
in debug mode. This enables the `edit-and-continue` debugging in in debug mode. This enables the `edit-and-continue` debugging in
Visual Studio IDE's. Visual Studio IDE's.
Unfortunately, it is also extremely expensive and breaks certain use cases such Unfortunately, it is also extremely expensive and breaks certain use cases such
as link time code generation. Edit and continue can be enabled by manually by as link time code generation. Edit and continue can be enabled by manually by
adding `/ZI` to compiler arguments. adding `/ZI` to compiler arguments.
The `/ZI` argument has now been replaced by the `/Zi` argument for debug builds. The `/ZI` argument has now been replaced by the `/Zi` argument for debug builds.
If this is an important issue for you and would like a builtin toggle option, If this is an important issue for you and would like a builtin toggle option,
please file an issue in the Meson bug tracker. please file an issue in the Meson bug tracker.
## Minimum required Python version updated to 3.6 ## Minimum required Python version updated to 3.6
@ -357,4 +357,3 @@ also allows `//` as the id. This way, `meson rewrite kwargs set project
All keys of the `configuration_data` object can be obtained with the `keys()` All keys of the `configuration_data` object can be obtained with the `keys()`
method as an alphabetically sorted array. method as an alphabetically sorted array.

@ -266,7 +266,7 @@ argument that will be separated by space.
## Specify man page locale during installation ## Specify man page locale during installation
Locale directories can now be passed to `install_man`: Locale directories can now be passed to `install_man`:
```meson ```meson
# instead of # instead of
# install_data('foo.fr.1', install_dir: join_paths(get_option('mandir'), 'fr', 'man1'), rename: 'foo.1')` # install_data('foo.fr.1', install_dir: join_paths(get_option('mandir'), 'fr', 'man1'), rename: 'foo.1')`
@ -354,4 +354,3 @@ The `b_sanitize` option for enabling Address sanitizer now works with
the Visual Studio compilers. This requires [a sufficiently new version the Visual Studio compilers. This requires [a sufficiently new version
of Visual of Visual
Studio](https://devblogs.microsoft.com/cppblog/address-sanitizer-for-msvc-now-generally-available/). Studio](https://devblogs.microsoft.com/cppblog/address-sanitizer-for-msvc-now-generally-available/).

@ -121,7 +121,7 @@ if intl_found
conf.set('ENABLE_NLS', 1) conf.set('ENABLE_NLS', 1)
endif endif
``` ```
one may simply use: one may simply use:
``` ```
@ -232,4 +232,3 @@ the cache upon installation. Most applications do that using a custom script,
but it can now be done by Meson directly. but it can now be done by Meson directly.
See [`gnome.post_install()`](Gnome-module.md#gnomepost_install). See [`gnome.post_install()`](Gnome-module.md#gnomepost_install).

@ -9,4 +9,3 @@ script.
On Linux you must build the package on the oldest distribution you On Linux you must build the package on the oldest distribution you
plan to support (Debian stable/oldstable and old CentOS are the common plan to support (Debian stable/oldstable and old CentOS are the common
choice here). choice here).

@ -534,7 +534,7 @@ class XCodeBackend(backends.Backend):
target_dependencies = list(map(lambda t: self.pbx_dep_map[t], self.build_targets)) target_dependencies = list(map(lambda t: self.pbx_dep_map[t], self.build_targets))
custom_target_dependencies = [self.pbx_custom_dep_map[t] for t in self.custom_targets] custom_target_dependencies = [self.pbx_custom_dep_map[t] for t in self.custom_targets]
aggregated_targets = [] aggregated_targets = []
aggregated_targets.append((self.all_id, 'ALL_BUILD', aggregated_targets.append((self.all_id, 'ALL_BUILD',
self.all_buildconf_id, self.all_buildconf_id,
[], [],
[self.regen_dependency_id] + target_dependencies + custom_target_dependencies)) [self.regen_dependency_id] + target_dependencies + custom_target_dependencies))
@ -554,7 +554,7 @@ class XCodeBackend(backends.Backend):
build_phases = [] build_phases = []
dependencies = [self.regen_dependency_id] dependencies = [self.regen_dependency_id]
generator_id = 0 generator_id = 0
for s in t.sources: for s in t.sources:
if not isinstance(s, build.GeneratedList): if not isinstance(s, build.GeneratedList):
continue continue
build_phases.append(self.shell_targets[(tname, generator_id)]) build_phases.append(self.shell_targets[(tname, generator_id)])
@ -602,7 +602,7 @@ class XCodeBackend(backends.Backend):
if s.is_built: if s.is_built:
in_build_dir = True in_build_dir = True
s = os.path.join(s.subdir, s.fname) s = os.path.join(s.subdir, s.fname)
if not isinstance(s, str): if not isinstance(s, str):
continue continue
sdict = PbxDict() sdict = PbxDict()
@ -610,7 +610,7 @@ class XCodeBackend(backends.Backend):
idval = self.buildfile_ids[k] idval = self.buildfile_ids[k]
fileref = self.fileref_ids[k] fileref = self.fileref_ids[k]
if in_build_dir: if in_build_dir:
fullpath = os.path.join(self.environment.get_build_dir(), s) fullpath = os.path.join(self.environment.get_build_dir(), s)
else: else:
fullpath = os.path.join(self.environment.get_source_dir(), s) fullpath = os.path.join(self.environment.get_source_dir(), s)
compiler_args = '' compiler_args = ''
@ -644,7 +644,7 @@ class XCodeBackend(backends.Backend):
for g in t.generated: for g in t.generated:
if not isinstance(g, build.GeneratedList): if not isinstance(g, build.GeneratedList):
continue continue
self.create_generator_shellphase(objects_dict, tname, generator_id) self.create_generator_shellphase(objects_dict, tname, generator_id)
generator_id += 1 generator_id += 1
# Custom targets are shell build phases in Xcode terminology. # Custom targets are shell build phases in Xcode terminology.
@ -661,7 +661,7 @@ class XCodeBackend(backends.Backend):
for g in t.sources: for g in t.sources:
if not isinstance(g, build.GeneratedList): if not isinstance(g, build.GeneratedList):
continue continue
self.create_generator_shellphase(objects_dict, tname, generator_id) self.create_generator_shellphase(objects_dict, tname, generator_id)
generator_id += 1 generator_id += 1
def create_generator_shellphase(self, objects_dict, tname, generator_id): def create_generator_shellphase(self, objects_dict, tname, generator_id):
@ -752,7 +752,7 @@ class XCodeBackend(backends.Backend):
name = os.path.basename(o) name = os.path.basename(o)
objects_dict.add_item(ref_id, odict, o) objects_dict.add_item(ref_id, odict, o)
xcodetype = self.get_xcodetype(o) xcodetype = self.get_xcodetype(o)
rel_name = mesonlib.relpath(o, self.environment.get_source_dir()) rel_name = mesonlib.relpath(o, self.environment.get_source_dir())
odict.add_item('isa', 'PBXFileReference') odict.add_item('isa', 'PBXFileReference')
odict.add_item('explicitFileType', '"' + xcodetype + '"') odict.add_item('explicitFileType', '"' + xcodetype + '"')
odict.add_item('fileEncoding', '4') odict.add_item('fileEncoding', '4')
@ -773,7 +773,7 @@ class XCodeBackend(backends.Backend):
o = os.path.join(t.subdir, o) o = os.path.join(t.subdir, o)
fullpath = os.path.join(self.environment.get_source_dir(), o) fullpath = os.path.join(self.environment.get_source_dir(), o)
idval = self.fileref_ids[(tname, o)] idval = self.fileref_ids[(tname, o)]
rel_name = mesonlib.relpath(fullpath, self.environment.get_source_dir()) rel_name = mesonlib.relpath(fullpath, self.environment.get_source_dir())
o_dict = PbxDict() o_dict = PbxDict()
name = os.path.basename(o) name = os.path.basename(o)
objects_dict.add_item(idval, o_dict, fullpath) objects_dict.add_item(idval, o_dict, fullpath)
@ -974,7 +974,7 @@ class XCodeBackend(backends.Backend):
target_children.add_item(self.fileref_ids[(tid, s)], s) target_children.add_item(self.fileref_ids[(tid, s)], s)
for o in t.objects: for o in t.objects:
if isinstance(o, build.ExtractedObjects): if isinstance(o, build.ExtractedObjects):
# Do not show built object files in the project tree. # Do not show built object files in the project tree.
continue continue
if isinstance(o, mesonlib.File): if isinstance(o, mesonlib.File):
o = os.path.join(o.subdir, o.fname) o = os.path.join(o.subdir, o.fname)
@ -1083,7 +1083,7 @@ class XCodeBackend(backends.Backend):
dep_array.add_item(self.pbx_custom_dep_map[o.get_id()], o.name) dep_array.add_item(self.pbx_custom_dep_map[o.get_id()], o.name)
elif isinstance(o, build.CustomTargetIndex): elif isinstance(o, build.CustomTargetIndex):
dep_array.add_item(self.pbx_custom_dep_map[o.target.get_id()], o.target.name) dep_array.add_item(self.pbx_custom_dep_map[o.target.get_id()], o.target.name)
generator_id += 1 generator_id += 1
ntarget_dict.add_item('name', f'"{tname}"') ntarget_dict.add_item('name', f'"{tname}"')
@ -1353,7 +1353,7 @@ class XCodeBackend(backends.Backend):
warn_array = PbxArray() warn_array = PbxArray()
warn_array.add_item('"$(inherited)"') warn_array.add_item('"$(inherited)"')
settings_dict.add_item('WARNING_CFLAGS', warn_array) settings_dict.add_item('WARNING_CFLAGS', warn_array)
bt_dict.add_item('name', f'"{buildtype}"') bt_dict.add_item('name', f'"{buildtype}"')
# Then the test target. # Then the test target.
@ -1410,7 +1410,7 @@ class XCodeBackend(backends.Backend):
dep_libs += sub_libs dep_libs += sub_libs
links_dylib = links_dylib or sub_links_dylib links_dylib = links_dylib or sub_links_dylib
return (dep_libs, links_dylib) return (dep_libs, links_dylib)
def generate_single_build_target(self, objects_dict, target_name, target): def generate_single_build_target(self, objects_dict, target_name, target):
for buildtype in self.buildtypes: for buildtype in self.buildtypes:
dep_libs = [] dep_libs = []
@ -1444,7 +1444,7 @@ class XCodeBackend(backends.Backend):
product_name = target.get_basename() product_name = target.get_basename()
ldargs += target.link_args ldargs += target.link_args
# Swift is special. Again. You can't mix Swift with other languages # Swift is special. Again. You can't mix Swift with other languages
# in the same target. Thus for Swift we only use # in the same target. Thus for Swift we only use
if self.is_swift_target(target): if self.is_swift_target(target):
linker, stdlib_args = target.compilers['swift'], [] linker, stdlib_args = target.compilers['swift'], []
else: else:
@ -1468,7 +1468,7 @@ class XCodeBackend(backends.Backend):
generator_id = 0 generator_id = 0
for o in target.generated: for o in target.generated:
if isinstance(o, build.GeneratedList): if isinstance(o, build.GeneratedList):
outputs = self.generator_outputs[target_name, generator_id] outputs = self.generator_outputs[target_name, generator_id]
generator_id += 1 generator_id += 1
for o_abs in outputs: for o_abs in outputs:
if o_abs.endswith('.o') or o_abs.endswith('.obj'): if o_abs.endswith('.o') or o_abs.endswith('.obj'):
@ -1701,7 +1701,7 @@ class XCodeBackend(backends.Backend):
pbxdict.add_item('objectVersion', '46') pbxdict.add_item('objectVersion', '46')
objects_dict = PbxDict() objects_dict = PbxDict()
pbxdict.add_item('objects', objects_dict) pbxdict.add_item('objects', objects_dict)
return objects_dict return objects_dict
def generate_suffix(self, pbxdict): def generate_suffix(self, pbxdict):

@ -1224,4 +1224,3 @@ FORBIDDEN_TARGET_NAMES = {'clean': None,
'dist': None, 'dist': None,
'distcheck': None, 'distcheck': None,
} }

@ -278,9 +278,9 @@ class PkgConfigDependency(ExternalDependency):
continue continue
elif lib.startswith('-l:'): elif lib.startswith('-l:'):
# see: https://stackoverflow.com/questions/48532868/gcc-library-option-with-a-colon-llibevent-a # see: https://stackoverflow.com/questions/48532868/gcc-library-option-with-a-colon-llibevent-a
# also : See the documentation of -lnamespec | --library=namespec in the linker manual # also : See the documentation of -lnamespec | --library=namespec in the linker manual
# https://sourceware.org/binutils/docs-2.18/ld/Options.html # https://sourceware.org/binutils/docs-2.18/ld/Options.html
# Don't resolve the same -l:libfoo.a argument again # Don't resolve the same -l:libfoo.a argument again
if lib in libs_found: if lib in libs_found:
continue continue

@ -164,4 +164,3 @@ class ObjCppProject(SampleImpl):
open(lib_objcpp_name, 'w', encoding='utf-8').write(lib_objcpp_template.format(**kwargs)) open(lib_objcpp_name, 'w', encoding='utf-8').write(lib_objcpp_template.format(**kwargs))
open(test_objcpp_name, 'w', encoding='utf-8').write(lib_objcpp_test_template.format(**kwargs)) open(test_objcpp_name, 'w', encoding='utf-8').write(lib_objcpp_test_template.format(**kwargs))
open('meson.build', 'w', encoding='utf-8').write(lib_objcpp_meson_template.format(**kwargs)) open('meson.build', 'w', encoding='utf-8').write(lib_objcpp_meson_template.format(**kwargs))

@ -114,4 +114,3 @@ if __name__ == '__main__':
pg = PkgGenerator() pg = PkgGenerator()
pg.build_dist() pg.build_dist()
pg.build_package() pg.build_package()

@ -1,2 +1 @@
configure_file(output : 'blank.txt', configuration : configuration_data()) configure_file(output : 'blank.txt', configuration : configuration_data())

@ -17,4 +17,3 @@ assert(a.has('WORLD'), 'New config data should have been set')
assert(not b.has('WORLD'), 'New config data set should not affect var copied earlier') assert(not b.has('WORLD'), 'New config data set should not affect var copied earlier')
configure_file(output : 'a.h', configuration : a) configure_file(output : 'a.h', configuration : a)

@ -1,4 +1,3 @@
project('skip', 'c') project('skip', 'c')
error('MESON_SKIP_TEST this test is always skipped.') error('MESON_SKIP_TEST this test is always skipped.')

@ -25,4 +25,3 @@
int main(void) { int main(void) {
return 0; return 0;
} }

@ -7,4 +7,3 @@ void func(void) {
int main(void) { int main(void) {
return 0; return 0;
} }

@ -3,4 +3,3 @@
int main(void) { int main(void) {
return FOO + BAR; return FOO + BAR;
} }

@ -7,4 +7,3 @@ void func(void) {
int main(void) { int main(void) {
return 0; return 0;
} }

@ -8,4 +8,3 @@ void func(void) {
int main(void) { int main(void) {
return 0; return 0;
} }

@ -0,0 +1,2 @@
[meson.build]
trim_trailing_whitespace = false

@ -41,4 +41,3 @@ p = executable('simdtest', 'simdchecker.c', 'fallback.c',
link_with : simdlibs) link_with : simdlibs)
test('simdtest', p) test('simdtest', p)

@ -34,4 +34,3 @@ void increment_sse2(float arr[4]) {
arr[2] = (float)darr[3]; arr[2] = (float)darr[3];
arr[3] = (float)darr[2]; arr[3] = (float)darr[2];
} }

@ -2,4 +2,3 @@ project('dotinclude', 'c')
executable('dotproc', 'dotproc.c', executable('dotproc', 'dotproc.c',
implicit_include_directories : false) implicit_include_directories : false)

@ -12,4 +12,3 @@ int func2(void);
#endif #endif
int DLL_PUBLIC func(void) { return func2(); } int DLL_PUBLIC func(void) { return func2(); }

@ -4,9 +4,9 @@ genh = custom_target('genh',
input : 'funname', input : 'funname',
output : 'funheader.h', output : 'funheader.h',
command : [fp, '@INPUT@', '@OUTPUT@']) command : [fp, '@INPUT@', '@OUTPUT@'])
dep = declare_dependency(sources : [genh]) dep = declare_dependency(sources : [genh])
e = executable('genuser', 'main.c', e = executable('genuser', 'main.c',
dependencies : dep) dependencies : dep)
test('genuser', e) test('genuser', e)

@ -7,4 +7,3 @@ subproject('a')
liba_dep = dependency('a', liba_dep = dependency('a',
fallback: ['a', 'liba_dep'], fallback: ['a', 'liba_dep'],
version: ['>= 0.30.0', '!= 0.99.0']) version: ['>= 0.30.0', '!= 0.99.0'])

@ -9,4 +9,3 @@ endif
executable('main', 'main.cpp') executable('main', 'main.cpp')
error('Unreachable') error('Unreachable')

@ -4,4 +4,3 @@ int main(void)
{ {
return call_foo() == 42 ? 0 : 1; return call_foo() == 42 ? 0 : 1;
} }

@ -4,4 +4,3 @@ int func(void)
{ {
return 1; return 1;
} }

@ -3,4 +3,3 @@
import os import os
assert os.environ['MY_PATH'] == os.pathsep.join(['0', '1', '2']) assert os.environ['MY_PATH'] == os.pathsep.join(['0', '1', '2'])

@ -1,4 +1,4 @@
project('subproj user', 'c', project('subproj user', 'c',
version : '2.3.4', version : '2.3.4',
license : 'mylicense') license : 'mylicense')

@ -1,4 +1,4 @@
project('subproject', 'c', project('subproject', 'c',
version : '1.0.0', version : '1.0.0',
license : ['sublicense1', 'sublicense2']) license : ['sublicense1', 'sublicense2'])

@ -12,4 +12,3 @@ int func2(void);
#endif #endif
int DLL_PUBLIC func(void) { return func2(); } int DLL_PUBLIC func(void) { return func2(); }

@ -15,4 +15,3 @@ output : 'vcstag-fallback.c')
executable('tagprog', 'tagprog.c', version_src) executable('tagprog', 'tagprog.c', version_src)
executable('tagprog-custom', 'tagprog.c', version_src_custom) executable('tagprog-custom', 'tagprog.c', version_src_custom)
executable('tagprog-fallback', 'tagprog.c', version_src_fallback) executable('tagprog-fallback', 'tagprog.c', version_src_fallback)

@ -6,4 +6,3 @@ int main(void) {
printf("Version is %s\n", vcstag); printf("Version is %s\n", vcstag);
return 0; return 0;
} }

@ -1,2 +1 @@
const char *vcstag = "@VCS_TAG@"; const char *vcstag = "@VCS_TAG@";

@ -6,4 +6,3 @@ test('fobj', executable('fobj', prog0, lib0))
subdir('subdir1') subdir('subdir1')
subdir('subdir2') subdir('subdir2')

@ -20,4 +20,3 @@ int func(void) {
#else #else
#error "Missing type definition." #error "Missing type definition."
#endif #endif

@ -9,4 +9,3 @@ h1 = install_headers('rootdir.h')
h2 = install_headers(as_array, subdir : 'subdir') h2 = install_headers(as_array, subdir : 'subdir')
h3 = install_headers(subheader) h3 = install_headers(subheader)
h4 = install_headers(disabler()) h4 = install_headers(disabler())

@ -1,2 +1 @@
subheader = files('fileheader.h') subheader = files('fileheader.h')

@ -2,4 +2,3 @@ project('simple', 'cuda', version : '1.0.0')
exe = executable('prog', 'prog.cu') exe = executable('prog', 'prog.cu')
test('cudatest', exe) test('cudatest', exe)

@ -27,4 +27,3 @@ int main(void) {
return 0; return 0;
} }

@ -2,4 +2,3 @@ project('simple', 'cuda', version : '1.0.0')
exe = executable('prog', 'prog.cu') exe = executable('prog', 'prog.cu')
test('cudatest', exe) test('cudatest', exe)

@ -1,5 +1,3 @@
[binaries] [binaries]
cuda = 'nvcc' cuda = 'nvcc'

@ -27,4 +27,3 @@ int main(void) {
return 0; return 0;
} }

@ -24,4 +24,3 @@ if cuda.version().version_compare('>=4.0')
assert (cuda.has_header_symbol('thrust/device_vector.h', 'thrust::device_vector'), 'thrust::device_vector not found') assert (cuda.has_header_symbol('thrust/device_vector.h', 'thrust::device_vector'), 'thrust::device_vector not found')
assert (not cuda.has_header_symbol('thrust/fill.h', 'thrust::sort'), 'thrust::sort should not be defined in thrust/fill.h') assert (not cuda.has_header_symbol('thrust/fill.h', 'thrust::sort'), 'thrust::sort should not be defined in thrust/fill.h')
endif endif

@ -27,4 +27,3 @@ int run_tests(void) {
return 0; return 0;
} }

@ -10,4 +10,3 @@ int do_cuda_stuff(void) {
printf("Hello, World!\n"); printf("Hello, World!\n");
return 0; return 0;
} }

@ -4,4 +4,3 @@ exe = executable('prog', 'main.cpp', 'lib.cu')
test('cudatest', exe) test('cudatest', exe)
subdir('static') subdir('static')

@ -10,4 +10,3 @@ int do_cuda_stuff() {
printf("Hello, World!\n"); printf("Hello, World!\n");
return 0; return 0;
} }

@ -10,4 +10,3 @@ int do_cuda_stuff() {
printf("Hello, World!\n"); printf("Hello, World!\n");
return 0; return 0;
} }

@ -67,4 +67,3 @@ assert(' '.join(cuda.nvcc_arch_flags('10.2', 'Auto', detected: [])) ==
'-gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 '+ '-gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 '+
'-gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 '+ '-gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 '+
'-gencode arch=compute_75,code=compute_75') '-gencode arch=compute_75,code=compute_75')

@ -27,4 +27,3 @@ int main(void) {
return 0; return 0;
} }

@ -11,4 +11,3 @@ TAG_PUBLIC int run_tests(void) {
return (int)cudaDeviceSynchronize(); return (int)cudaDeviceSynchronize();
} }

@ -11,4 +11,3 @@ TAG_PUBLIC int run_tests(void) {
return (int)cudaDeviceSynchronize(); return (int)cudaDeviceSynchronize();
} }

@ -6,13 +6,13 @@ int main(int, char**) {
// initialize D runtime // initialize D runtime
if (!rt_init()) if (!rt_init())
return 1; return 1;
print_hello(1); print_hello(1);
// terminate D runtime, each initialize call // terminate D runtime, each initialize call
// must be paired with a terminate call. // must be paired with a terminate call.
if (!rt_term()) if (!rt_term())
return 1; return 1;
return 0; return 0;
} }

@ -1,2 +1 @@
ldyn = shared_library('stuff', 'libstuff.d', install : true) ldyn = shared_library('stuff', 'libstuff.d', install : true)

@ -41,19 +41,19 @@ void main (string[] args)
exit (1); exit (1);
} }
} }
version (With_VersionInteger) version (With_VersionInteger)
version(3) exit(0); version(3) exit(0);
version (With_Debug) version (With_Debug)
debug exit(0); debug exit(0);
version (With_DebugInteger) version (With_DebugInteger)
debug(3) exit(0); debug(3) exit(0);
version (With_DebugIdentifier) version (With_DebugIdentifier)
debug(DebugIdentifier) exit(0); debug(DebugIdentifier) exit(0);
version (With_DebugAll) { version (With_DebugAll) {
int dbg = 0; int dbg = 0;
debug dbg++; debug dbg++;
@ -61,7 +61,7 @@ void main (string[] args)
debug(3) dbg++; debug(3) dbg++;
debug(4) dbg++; debug(4) dbg++;
debug(DebugIdentifier) dbg++; debug(DebugIdentifier) dbg++;
if (dbg == 5) if (dbg == 5)
exit(0); exit(0);
} }

@ -7,4 +7,3 @@ void func() {
int main(int argc, char **argv) { int main(int argc, char **argv) {
return 0; return 0;
} }

@ -1,2 +1 @@
option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature') option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature')

@ -1,2 +1 @@
I'm only here because Git is stupid about empty dirs. I'm only here because Git is stupid about empty dirs.

@ -1,4 +1,3 @@
project('assign in kwarg', 'c') project('assign in kwarg', 'c')
executable('prog', 'dummy.c', args = 'prog.c') executable('prog', 'dummy.c', args = 'prog.c')

@ -3,4 +3,3 @@ project('abs subdir', 'c')
# For some reason people insist on doing this, probably # For some reason people insist on doing this, probably
# because Make has taught them to never rely on anything. # because Make has taught them to never rely on anything.
subdir(join_paths(meson.source_root(), 'bob')) subdir(join_paths(meson.source_root(), 'bob'))

@ -9,4 +9,3 @@ subdir('sub')
executable('sub/prog', pf) executable('sub/prog', pf)
error('Re-enable me once slash in name is finally prohibited.') error('Re-enable me once slash in name is finally prohibited.')

@ -1,2 +1 @@
pf = files('prog.c') pf = files('prog.c')

@ -3,4 +3,3 @@
# Decimal syntax is 123. # Decimal syntax is 123.
# Octal syntax is 0o123. # Octal syntax is 0o123.
fail_0123 = 0123 fail_0123 = 0123

@ -15,6 +15,3 @@ endif
if fc.run(code).returncode() != 123 if fc.run(code).returncode() != 123
error('Fortran 2008 code failed to run') error('Fortran 2008 code failed to run')
endif endif

@ -11,4 +11,3 @@ print *, 'Good!'
end procedure good end procedure good
end submodule parent end submodule parent

@ -8,4 +8,3 @@ length = pi
print *, length print *, length
end program end program

@ -1,5 +1,5 @@
module main_lib module main_lib
use static_hello use static_hello
implicit none implicit none

@ -6,4 +6,3 @@ is.project('spin',
'spin.v', 'spin.v',
constraint_file : 'spin.pcf', constraint_file : 'spin.pcf',
) )

@ -1,29 +1,29 @@
module top(input clk, output LED1, output LED2, output LED3, output LED4, output LED5); module top(input clk, output LED1, output LED2, output LED3, output LED4, output LED5);
reg ready = 0; reg ready = 0;
reg [23:0] divider; reg [23:0] divider;
reg [3:0] spin; reg [3:0] spin;
always @(posedge clk) begin always @(posedge clk) begin
if (ready) if (ready)
begin begin
if (divider == 6000000) if (divider == 6000000)
begin begin
divider <= 0; divider <= 0;
spin <= {spin[2], spin[3], spin[0], spin[1]}; spin <= {spin[2], spin[3], spin[0], spin[1]};
end end
else else
divider <= divider + 1; divider <= divider + 1;
end end
else else
begin begin
ready <= 1; ready <= 1;
spin <= 4'b1010; spin <= 4'b1010;
divider <= 0; divider <= 0;
end end
end end
assign LED1 = spin[0]; assign LED1 = spin[0];
assign LED2 = spin[1]; assign LED2 = spin[1];
assign LED3 = spin[2]; assign LED3 = spin[2];

@ -25,4 +25,3 @@ int main(void) {
return 0; return 0;
} }

@ -13,4 +13,3 @@ FOO_MAJOR_VERSION
FOO_MINOR_VERSION FOO_MINOR_VERSION
FOO_MICRO_VERSION FOO_MICRO_VERSION
</SECTION> </SECTION>

@ -14,4 +14,3 @@ html_target = custom_target('spede-docs',
command: [doxygen, doxyfile], command: [doxygen, doxyfile],
install: true, install: true,
install_dir: datadir) install_dir: datadir)

@ -25,4 +25,3 @@ else
endif endif
subdir('doc') subdir('doc')

@ -1,4 +1,4 @@
/** This code is public domain, and taken from /** This code is public domain, and taken from
* https://github.com/paulsmith/getting-started-llvm-c-api/blob/master/sum.c * https://github.com/paulsmith/getting-started-llvm-c-api/blob/master/sum.c
*/ */
/** /**

@ -1,3 +1,2 @@
index.md index.md
c-index c-index

@ -12,4 +12,3 @@ assert(hotdoc.has_extensions(['gi-extension']) == true,
assert(hotdoc.has_extensions(['gi-extension', 'no-way-you-exist-extension']) == false, assert(hotdoc.has_extensions(['gi-extension', 'no-way-you-exist-extension']) == false,
'A hotdoc extension called "no-way-you-exist-extension" should never be found.') 'A hotdoc extension called "no-way-you-exist-extension" should never be found.')

@ -13,5 +13,5 @@ print '(A,I1,A1,I0.2,A1,I1)','Fortran HDF5 version ',major,'.',minor,'.',rel
call h5close_f(ier) call h5close_f(ier)
if (ier /= 0) error stop 'Unable to close HDF5 library' if (ier /= 0) error stop 'Unable to close HDF5 library'
end program end program

@ -24,4 +24,3 @@ int main(int argc, char **argv) {
} }
#include"manualinclude.moc" #include"manualinclude.moc"

@ -51,7 +51,7 @@ foreach qt : ['qt4', 'qt5', 'qt6']
# requires you to do it properly or you get linker symbol clashes. # requires you to do it properly or you get linker symbol clashes.
prep = qtmodule.preprocess( prep = qtmodule.preprocess(
moc_headers : ['mainWindow.h'], # These need to be fed through the moc tool before use. moc_headers : ['mainWindow.h'], # These need to be fed through the moc tool before use.
method : get_option('method') method : get_option('method')
) )
# XML files that need to be compiled with the uic tol. # XML files that need to be compiled with the uic tol.

@ -3,4 +3,3 @@ Name=Test
GenericName=Application GenericName=Application
Comment=Test Application Comment=Test Application
Type=Application Type=Application

@ -3,4 +3,3 @@ Name=Test
GenericName=Application GenericName=Application
Comment=Test Application Comment=Test Application
Type=Application Type=Application

@ -3,4 +3,3 @@ Name=Test 2
GenericName=Application GenericName=Application
Comment=Test Application Comment=Test Application
Type=Application Type=Application

@ -3,4 +3,3 @@ Name=Test 2
GenericName=@NAME@ GenericName=@NAME@
Comment=Test Application Comment=Test Application
Type=Application Type=Application

@ -3,4 +3,3 @@ Name=Test 2
GenericName=@NAME@ GenericName=@NAME@
Comment=Test Application Comment=Test Application
Type=Application Type=Application

@ -3,4 +3,3 @@ Name=Test
GenericName=Application GenericName=Application
Description=Test Application Description=Test Application
Type=Application Type=Application

@ -3,7 +3,7 @@
#include "parser.tab.h" #include "parser.tab.h"
extern int yylex(void); extern int yylex(void);
extern int yyerror(); extern int yyerror();
%} %}
%option noyywrap nounput noinput %option noyywrap nounput noinput

@ -3,11 +3,11 @@ package com.mesonbuild;
class TextPrinter { class TextPrinter {
private String msg; private String msg;
TextPrinter(String s) { TextPrinter(String s) {
msg = s; msg = s;
} }
public void print() { public void print() {
System.out.println(msg); System.out.println(msg);
} }

@ -6,4 +6,3 @@ javaprog = jar('myprog', 'com/mesonbuild/Simple.java',
main_class : 'com.mesonbuild.Simple', main_class : 'com.mesonbuild.Simple',
java_args : ['-source', '1.7']) java_args : ['-source', '1.7'])
test('mytest', javaprog) test('mytest', javaprog)

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save