mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 07:22:43 +01:00
meson: Apply formatting universally
Now that we have applied the [1] patch, the diff is much nicer and less noisy. [1]: https://www.github.com/mesonbuild/meson/pull/14861
This commit is contained in:
parent
bf80696ed9
commit
385e2c3542
62 changed files with 444 additions and 454 deletions
|
|
@ -1,4 +1,6 @@
|
|||
project('nix-util', 'cpp',
|
||||
project(
|
||||
'nix-util',
|
||||
'cpp',
|
||||
version : files('.version'),
|
||||
default_options : [
|
||||
'cpp_std=c++2a',
|
||||
|
|
@ -16,10 +18,8 @@ subdir('nix-meson-build-support/deps-lists')
|
|||
|
||||
configdata = configuration_data()
|
||||
|
||||
deps_private_maybe_subproject = [
|
||||
]
|
||||
deps_public_maybe_subproject = [
|
||||
]
|
||||
deps_private_maybe_subproject = []
|
||||
deps_public_maybe_subproject = []
|
||||
subdir('nix-meson-build-support/subprojects')
|
||||
|
||||
# Check for each of these functions, and create a define like `#define
|
||||
|
|
@ -34,7 +34,7 @@ check_funcs = [
|
|||
foreach funcspec : check_funcs
|
||||
define_name = 'HAVE_' + funcspec[0].underscorify().to_upper()
|
||||
define_value = cxx.has_function(funcspec[0]).to_int()
|
||||
configdata.set(define_name, define_value, description: funcspec[1])
|
||||
configdata.set(define_name, define_value, description : funcspec[1])
|
||||
endforeach
|
||||
|
||||
subdir('nix-meson-build-support/libatomic')
|
||||
|
|
@ -45,21 +45,21 @@ if host_machine.system() == 'windows'
|
|||
elif host_machine.system() == 'sunos'
|
||||
socket = cxx.find_library('socket')
|
||||
network_service_library = cxx.find_library('nsl')
|
||||
deps_other += [socket, network_service_library]
|
||||
deps_other += [ socket, network_service_library ]
|
||||
endif
|
||||
|
||||
blake3 = dependency(
|
||||
'libblake3',
|
||||
version: '>= 1.8.2',
|
||||
version : '>= 1.8.2',
|
||||
method : 'pkg-config',
|
||||
)
|
||||
deps_private += blake3
|
||||
|
||||
boost = dependency(
|
||||
'boost',
|
||||
modules : ['context', 'coroutine', 'iostreams', 'url'],
|
||||
include_type: 'system',
|
||||
version: '>=1.82.0'
|
||||
modules : [ 'context', 'coroutine', 'iostreams', 'url' ],
|
||||
include_type : 'system',
|
||||
version : '>=1.82.0',
|
||||
)
|
||||
# boost is a public dependency, but not a pkg-config dependency unfortunately, so we
|
||||
# put in `deps_other`.
|
||||
|
|
@ -93,7 +93,12 @@ cpuid_required = get_option('cpuid')
|
|||
if host_machine.cpu_family() != 'x86_64' and cpuid_required.enabled()
|
||||
warning('Force-enabling seccomp on non-x86_64 does not make sense')
|
||||
endif
|
||||
cpuid = dependency('libcpuid', 'cpuid', version : '>= 0.7.0', required : cpuid_required)
|
||||
cpuid = dependency(
|
||||
'libcpuid',
|
||||
'cpuid',
|
||||
version : '>= 0.7.0',
|
||||
required : cpuid_required,
|
||||
)
|
||||
configdata.set('HAVE_LIBCPUID', cpuid.found().to_int())
|
||||
deps_private += cpuid
|
||||
|
||||
|
|
@ -109,7 +114,7 @@ config_priv_h = configure_file(
|
|||
|
||||
subdir('nix-meson-build-support/common')
|
||||
|
||||
sources = [config_priv_h] + files(
|
||||
sources = [ config_priv_h ] + files(
|
||||
'archive.cc',
|
||||
'args.cc',
|
||||
'base-n.cc',
|
||||
|
|
@ -117,8 +122,8 @@ sources = [config_priv_h] + files(
|
|||
'canon-path.cc',
|
||||
'compression.cc',
|
||||
'compute-levels.cc',
|
||||
'configuration.cc',
|
||||
'config-global.cc',
|
||||
'configuration.cc',
|
||||
'current-process.cc',
|
||||
'english.cc',
|
||||
'environment-variables.cc',
|
||||
|
|
@ -137,8 +142,8 @@ sources = [config_priv_h] + files(
|
|||
'logging.cc',
|
||||
'memory-source-accessor.cc',
|
||||
'mounted-source-accessor.cc',
|
||||
'position.cc',
|
||||
'pos-table.cc',
|
||||
'position.cc',
|
||||
'posix-source-accessor.cc',
|
||||
'references.cc',
|
||||
'serialise.cc',
|
||||
|
|
@ -146,8 +151,8 @@ sources = [config_priv_h] + files(
|
|||
'signature/signer.cc',
|
||||
'source-accessor.cc',
|
||||
'source-path.cc',
|
||||
'subdir-source-accessor.cc',
|
||||
'strings.cc',
|
||||
'subdir-source-accessor.cc',
|
||||
'suggestions.cc',
|
||||
'tarfile.cc',
|
||||
'tee-logger.cc',
|
||||
|
|
@ -190,10 +195,10 @@ this_library = library(
|
|||
sources,
|
||||
dependencies : deps_public + deps_private + deps_other,
|
||||
include_directories : include_dirs,
|
||||
link_args: linker_export_flags,
|
||||
link_args : linker_export_flags,
|
||||
prelink : true, # For C++ static initializers
|
||||
install : true,
|
||||
cpp_pch : do_pch ? ['pch/precompiled-headers.hh'] : []
|
||||
cpp_pch : do_pch ? [ 'pch/precompiled-headers.hh' ] : [],
|
||||
)
|
||||
|
||||
install_headers(headers, subdir : 'nix/util', preserve_path : true)
|
||||
|
|
@ -202,7 +207,7 @@ libraries_private = []
|
|||
if host_machine.system() == 'windows'
|
||||
# `libraries_private` cannot contain ad-hoc dependencies (from
|
||||
# `find_library), so we need to do this manually
|
||||
libraries_private += ['-lws2_32']
|
||||
libraries_private += [ '-lws2_32' ]
|
||||
endif
|
||||
|
||||
subdir('nix-meson-build-support/export')
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
# vim: filetype=meson
|
||||
|
||||
option('cpuid', type : 'feature',
|
||||
option(
|
||||
'cpuid',
|
||||
type : 'feature',
|
||||
description : 'determine microarchitecture levels with libcpuid (only relevant on x86_64)',
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ configdata_unix = configuration_data()
|
|||
configdata_unix.set(
|
||||
'HAVE_DECL_AT_SYMLINK_NOFOLLOW',
|
||||
cxx.has_header_symbol('fcntl.h', 'AT_SYMLINK_NOFOLLOW').to_int(),
|
||||
description : 'Optionally used for changing the files and symlinks.'
|
||||
description : 'Optionally used for changing the files and symlinks.',
|
||||
)
|
||||
|
||||
# Check for each of these functions, and create a define like `#define
|
||||
|
|
@ -39,7 +39,7 @@ check_funcs_unix = [
|
|||
foreach funcspec : check_funcs_unix
|
||||
define_name = 'HAVE_' + funcspec[0].underscorify().to_upper()
|
||||
define_value = cxx.has_function(funcspec[0]).to_int()
|
||||
configdata_unix.set(define_name, define_value, description: funcspec[1])
|
||||
configdata_unix.set(define_name, define_value, description : funcspec[1])
|
||||
endforeach
|
||||
|
||||
config_unix_priv_h = configure_file(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue