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

missing -Wall -Wextra in subdirectories. #1223

Open
rgetz opened this issue Dec 31, 2024 · 0 comments
Open

missing -Wall -Wextra in subdirectories. #1223

rgetz opened this issue Dec 31, 2024 · 0 comments

Comments

@rgetz
Copy link
Contributor

rgetz commented Dec 31, 2024

Because the CFlags were set to 'private', they don't decend into the subdirectories, and all sorts of issues have leaked into the code base (most concerned about iiod). This change should be applied, and then all issues should be fixed.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5eee82f7..d7f90ec0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -211,7 +211,7 @@ elseif (CMAKE_COMPILER_IS_GNUCC)
        check_c_compiler_flag(-Wpedantic HAS_WPEDANTIC)
        check_c_compiler_flag(-Wshadow HAS_WSHADOW)

-       target_compile_options(iio PRIVATE -Wall -Wextra -Wno-unused-parameter
+       target_compile_options(iio PUBLIC -Wall -Wextra -Wno-unused-parameter
                $<$<BOOL:HAS_WPEDANTIC>:-Wpedantic>
                $<$<BOOL:HAS_WSHADOW>:-Wshadow>
        )
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

1 participant