microsoft / microsoft/onnxruntime
[Feature Request] Enable to pass `-Wno-dev` flag to cmake using the `./build.sh` script
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
### Describe the feature request
`-Wno-dev` is a cmake flag to suppress warning that are intended for the developers of the cmake project and not the users.
It is really useful to filter warning as users of any cmake library
The `--cmake_extra_defines` does not allow to do that, which make sense. But I think it would be a great addition to allow to pass such a flag to cmake.
### Describe scenario use case
I'm building onnxruntime as a dependency of my project and tweaking the configuration based on the needs and target architecture.
onnxruntime produces several warning that are not related to what I do and that I cannot suppress using configuration flag, like this one :
```
[build] Call Stack (most recent call first):
[build] CMakeLists.txt:1609 (include)
[build] This warning is for project developers. Use -Wno-dev to suppress it.
[build]
[build] CMake Warning at onnxruntime_mlas.cmake:63 (message):
[build] AMX instructions NOT supported due to lack of compiler tool chain!
[build] Call Stack (most recent call first):
[build] CMakeLists.txt:1609 (include)
```
Here I'm building for arm64 and I have a dev warning about intel instruction, which kinda pollutes my cmake output
Contributor guide
Research direction
Start with ./build.sh and trace how --cmake_extra_defines is parsed and passed to CMake. Check any build-script tests or documented options mentioned nearby; done means users can provide -Wno-dev through the script and the resulting CMake invocation suppresses developer warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, shell
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100