Skip to content

Does meson pass something like -DDebug or -DRelease when compiling? #9948

Discussion options

You must be logged in to vote

You can check the value of get_option('debug') to check whether the compiler has been instructed to include debug info.

You can check get_option('buildtype') to see if the build profile is "release" i.e. has the debug and optimization settings typically associated with release builds. There is also a b_ndebug core option which has a possible value of "if-release" which only passes -DNDEBUG when the buildtype is a release (or plain) build.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by wbehrens-on-gh
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants