mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
Merge build-utils-meson/{diagnostics,threads} into build-utils-meson/common
This reduces the amount of boilerplate. More importantly, it provides a place to add compiler flags (such as -O3) without having to add it to every subproject (and the risk of forgetting to include it).
This commit is contained in:
parent
45b0158d91
commit
965ca18db8
22 changed files with 27 additions and 64 deletions
18
build-utils-meson/common/meson.build
Normal file
18
build-utils-meson/common/meson.build
Normal file
|
@ -0,0 +1,18 @@
|
|||
# This is only conditional to work around
|
||||
# https://github.com/mesonbuild/meson/issues/13293. It should be
|
||||
# unconditional.
|
||||
if not (host_machine.system() == 'windows' and cxx.get_id() == 'gcc')
|
||||
deps_private += dependency('threads')
|
||||
endif
|
||||
|
||||
add_project_arguments(
|
||||
'-Wdeprecated-copy',
|
||||
'-Werror=suggest-override',
|
||||
'-Werror=switch',
|
||||
'-Werror=switch-enum',
|
||||
'-Werror=unused-result',
|
||||
'-Wignored-qualifiers',
|
||||
'-Wimplicit-fallthrough',
|
||||
'-Wno-deprecated-declarations',
|
||||
language : 'cpp',
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue