-
Notifications
You must be signed in to change notification settings - Fork 212
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
In libavif v1.1.0, only the source files in the avif_obj and avif_apps_obj OBJECT libraries are compiled with warnings enabled #2340
Comments
It collects all warning-related compiler options and macro definitions. Re-enable warnings on the apps (avifdec, avifenc, and avifgainmaputil). Warnings on the tests will be re-enabled separately. A partial fix for #2340. Note: We cannot use add_compile_options() to enable warnings, because add_compile_options() affects not only our own targets but also the external dependencies we bring in by FetchContent.
Note that the fuzztest targets are not compiled with warnings enabled because the FuzzTest and Abseil headers have compiler warnings. Part 2 of the fix for AOMediaCodec#2340.
Note that the fuzztest targets are not compiled with warnings enabled because the FuzzTest and Abseil headers have compiler warnings. Part 2 of the fix for #2340.
"gtest/gtest.h" is included by avifincrtest_helpers.cc but not by the header avifincrtest_helpers.h, so move GTest::GTest to the PRIVATE scope. Also move avif_enable_warnings to the PRIVATE scope. Part 3 of the fix for AOMediaCodec#2340.
"gtest/gtest.h" is included by avifincrtest_helpers.cc but not by the header avifincrtest_helpers.h, so move GTest::GTest to the PRIVATE scope. Also move avif_enable_warnings to the PRIVATE scope. Part 3 of the fix for #2340.
I verified with a local build on Linux that this bug has been fixed except the fuzztest targets in tests/CMakeLists.txt. I agree that the new method is tedious and it is easy to miss when we add a new library or executable target. But no solution for this issue is perfect. I probably would prefer We can adjust the new method, such as changing the |
In libavif v1.1.0, only the source files in the avif_obj and avif_apps_obj OBJECT libraries are compiled with warnings enabled.
The source files in the examples, apps, and tests are NOT compiled with warnings enabled.
The text was updated successfully, but these errors were encountered: