Replies: 3 comments 5 replies
-
Agreed on target_compile_options ! |
Beta Was this translation helpful? Give feedback.
-
I just tested this and while it works for simple one target things like the vendored ddb it fails on folly as I think I have a better approach though that will also have other advantages but I will need to experiment a bit. |
Beta Was this translation helpful? Give feedback.
-
Today we make warnings into errors when compiling Velox (-Werror). By default, when compiling dependencies and vendored code (like folly and duckdb), we push the same compiler options, which results in the compilation of these dependencies to also turn warnings into errors. We have seen issues with that in the past (since some of this code might not have the same level of hygiene), but also that's harder to fix these warnings/errors as they do not come from Velox code. So we end having multiple cmake files where we selectively disable specific warnings when compiling dependencies as we hit them:
https://github.com/facebookincubator/velox/blob/main/velox/external/duckdb/CMakeLists.txt#L22
https://github.com/facebookincubator/velox/blob/main/CMake/resolve_dependency_modules/folly.cmake#L30
(and more)
When upgrading my system and trying a slightly newer version of gcc (12.2), I bumped into new issues, supposedly because the new compiler version added or changed the criteria for these warnings.
The suggestion comes from a quick discussion with @assignUser , but should we, by default, suppress warnings when compiling dependency code (say, folly and duckdb)? These warning just pollute the output, and make our build system harder to maintain. Ultimately, fixing these warning in most cases cannot be done in our repo and should be handled by that projects maintainers.
Something as simple as
target_compile_options(duckdb PUBLIC -w)
seems to solve the issue.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions