From e30bb2371133b95c09b11495eb57a5fa0dc49e90 Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Tue, 18 Jun 2019 12:07:52 +0000 Subject: [PATCH] build: Add debug/release options --- meson.build | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meson.build b/meson.build index 62ae6245..88ff132b 100644 --- a/meson.build +++ b/meson.build @@ -7,6 +7,13 @@ project( default_options: [ 'warning_level=1', 'buildtype=debugoptimized', 'c_std=gnu11' ], ) +if get_option('buildtype').startswith('debug') + add_project_arguments('-DDEBUG=1', language : 'c') +endif +if get_option('buildtype') != 'plain' + add_project_arguments('-fstack-protector-strong', language: 'c') +endif + prefix = get_option('prefix') datadir = join_paths(prefix, get_option('datadir')) pkgdatadir = join_paths(datadir, meson.project_name())