Skip to content

Fix CMakeLists.txt to handle deprecated gpu Warnings #3163

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

Merged
merged 4 commits into from
May 20, 2025

Conversation

jugal-sheth
Copy link
Contributor

Added -Wno-deprecated-gpu-targets instead of -Wno-deprecated

@jugal-sheth
Copy link
Contributor Author

This new change updates the CMake configuration to apply -Wno-deprecated-gpu-targets only when GGML_CUDA is enabled.
Replaced the global CMAKE_CXX_FLAGS override with a conditional:

if (GGML_CUDA)
    add_compile_options(-Wno-deprecated-gpu-targets)
endif()

Should prevent non-CUDA platforms from throwing warnings like:

warning: unknown warning option '-Wno-deprecated-gpu-targets'; did you mean '-Wno-deprecated-pragma'?

Apologies for missing this earlier I didn't catch that applying this flag unconditionally would trigger issues on non-CUDA systems. Thanks for pointing it out. This change is intended to make sure that warning is handled without polluting global flags

@jugal-sheth jugal-sheth reopened this May 20, 2025
@danbev danbev merged commit 62dc8f7 into ggml-org:master May 20, 2025
56 of 106 checks passed
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

Successfully merging this pull request may close these issues.

2 participants