Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Stk::showWarnings() via LMMS_DEBUG #3309

Merged
merged 1 commit into from
Jan 30, 2017

Conversation

zonkmachine
Copy link
Member

Fixup of #3172

@zonkmachine zonkmachine merged commit 3e21e4e into LMMS:master Jan 30, 2017
@tresf
Copy link
Member

tresf commented Jan 30, 2017

@zonkmachine I was going to comment on this before merge...

We should really consider configuring this debug value into a header to avoid unnecessary pre-compiler tags all over our code.

Perhaps a nice home for it would be here: https://github.com/LMMS/lmms/blob/master/src/lmmsconfig.h.in

@tresf
Copy link
Member

tresf commented Jan 30, 2017

Sorry... bad example... LMMS_VERSION is a better example despite lmmsconfig.h.in is probably a more appropriate home. Note how the logic in the code can use it directly, rather than changing the precompile behavior. This means we could do something like: Stk::showWarnings(LMMS_DEBUG) instead. :)

Also, side-note... probably overkill to have both lmmsconfig.h.in as well as lmmsversion.h.in We should consider consolidating these. /offtopic.

@zonkmachine
Copy link
Member Author

This means we could do something like: Stk::showWarnings(LMMS_DEBUG) instead. :)

OK, interesting so...

#cmakedefine LMMS_DEBUG 1
#ifndef LMMS_DEBUG
#define LMMS_DEBUG 0
#endif

...

Stk::showWarnings(LMMS_DEBUG);

@zonkmachine zonkmachine deleted the malletsdbg branch January 30, 2017 17:22
@tresf
Copy link
Member

tresf commented Jan 30, 2017

@zonkmachine poorly documented as many of the cmake features, but I believe this will do the trick:

#cmakedefine01 LMMS_DEBUG

Per example @webkit/Source/cmakeconfig.h.cmake#L4, documented here: https://cmake.org/cmake/help/v3.2/command/configure_file.html?highlight=cmakedefine01

Yes, you read that right, #cmakedefine01 :)

sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants