From e52ce543a4a0ceda4cba7ddb2be48ee653336c12 Mon Sep 17 00:00:00 2001 From: p01arst0rm Date: Fri, 25 Oct 2019 14:42:29 +0100 Subject: chore(3p/nix): more improvements (cherry picked from commit 507d28fd226e018d5927b49b1bd07833cbd49d25) --- third_party/nix/meson.build | 7 +++++-- third_party/nix/meson_options.txt | 12 ++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'third_party') diff --git a/third_party/nix/meson.build b/third_party/nix/meson.build index fac6c4fd30..8458312569 100644 --- a/third_party/nix/meson.build +++ b/third_party/nix/meson.build @@ -16,7 +16,9 @@ project( default_options : [ 'cpp_std=c++17', - 'warning_level=3' + 'warning_level=3', + 'optimization=3', + 'debug=true' ], version : run_command('cat', './.version').stdout().strip(), license : 'MIT' @@ -26,7 +28,7 @@ project( #------------------------------------------------- cpp = meson.get_compiler('cpp') -add_project_arguments('-g', '-Wdeprecated', '-Wno-non-virtual-dtor', '-include', 'config.h', language : 'cpp') +add_project_arguments(get_option('cxxflags'), language : 'cpp') add_project_link_arguments(get_option('ldflags'), language: 'cpp') @@ -535,6 +537,7 @@ install_headers( conf, install_dir : join_paths(includedir, 'nix')) +add_project_arguments('-include', 'config.h', language : 'cpp') src_inc = [include_directories('.', 'src')] project_dirs = [ diff --git a/third_party/nix/meson_options.txt b/third_party/nix/meson_options.txt index b7aa5bd279..9bad1b2c4c 100644 --- a/third_party/nix/meson_options.txt +++ b/third_party/nix/meson_options.txt @@ -25,19 +25,15 @@ option( '-L/lib'], description : 'Link flags') -option( - 'cflags', - type : 'array', - value : [ - '-O3'], - description : 'C build flags') option( 'cxxflags', type : 'array', value : [ - '-O3'], - description : 'CXX build flags') + '-Wdeprecated', + '-Wno-non-virtual-dtor', + '-Wno-unused-parameter'], + description : 'C build flags') -- cgit 1.4.1