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

DEBUGPR and -Wall #9

Open
whart222 opened this issue Apr 24, 2019 · 2 comments
Open

DEBUGPR and -Wall #9

whart222 opened this issue Apr 24, 2019 · 2 comments

Comments

@whart222
Copy link
Contributor

-Wall complains that DEBUGPR creates unused temporary variables. We should investigate this and see if this can be avoided.

@whart222
Copy link
Contributor Author

From Jonathan's email:

it seems that all our DEBUGPR macros are being preprocessed down to no-ops. This was triggering some warnings about unused variables.
I think we should have some way of turning these macros back on, which looks like it requires setting the preprocessor symbol UTILIB_YES_DEBUGPR. Ideally, it would be nice to have an explicit cmake option to turn on this symbol. I was able to turn it on by toggling advanced mode and changing MPI_CXX_COMPILE_OPTIONS from "-pthread" to "-DUTILIB_YES_DEBUGPR -pthread". (However, instead setting MPI_CXX_COMPILE_DEFINITIONS to "UTILIB_YES_DEBUGPR" did not work, causing a compiler error.)
Furthermore, trying to set MPI_CXX_COMPILE_OPTIONS to "-Wall -DUTILIB_YES_DEBUGPR -pthread" so that I could check -Wall behavior when DEBUGPRs are being compiled did not work either, causing a cmake error with the complaint MPI_CXX_WORKS is false.
Ideally I would like to compile cleanly under -Wall with DEBUGPRs compiled and with DEBUGPRs not compiled. But it seems right now that I cannot have both -Wall and compiled DEBUGPRs.
What would be great is if we could have explicit cmake options for (1) making sure DEBUGPR's are compiled and (2) turning on -Wall. If it makes it simpler, I guess we could just trigger the DEBUGPR compilation for all "Debug" builds, although I could see some value in having a combination of an optimized build and DEBUGPRs. So, I'd prefer that it be a separate option.

@jeckstei
Copy link
Contributor

jeckstei commented Apr 24, 2019 via email

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

No branches or pull requests

2 participants