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

Enable various C++ build-time warnings and treat them as errors #340

Merged
2 changes: 1 addition & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ set(UCXX_BUILD_TESTS ${BUILD_TESTS})
set(UCXX_BUILD_BENCHMARKS ${BUILD_BENCHMARKS})
set(UCXX_BUILD_EXAMPLES ${BUILD_EXAMPLES})

set(UCXX_CXX_FLAGS "")
set(UCXX_CXX_FLAGS "-Wall" "-Wattributes" "-Werror")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other things that might be worthwhile adding -Wextra, -Wsign-conversion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Lawrence for the suggestions. I've extended those in ba26e7e . Additionally I added -Wno-missing-field-initializers this is because we otherwise hit those warnings when initializing many of the UCP structures where we don't (and probably shouldn't, at least not in all cases) fill those values. Alternatively we could use #pragmas to filter them out, but I'm not sure if it's worth it. If you have other better ideas please let me know as well.

set(UCXX_CXX_DEFINITIONS "")

# Set RMM logging level
Expand Down
Loading