diff options
-rw-r--r-- | third_party/nix/meson.build | 7 | ||||
-rw-r--r-- | third_party/nix/meson_options.txt | 12 |
2 files changed, 9 insertions, 10 deletions
diff --git a/third_party/nix/meson.build b/third_party/nix/meson.build index fac6c4fd30fb..8458312569bb 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 b7aa5bd27949..9bad1b2c4c65 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') |