Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Change -Werror handling. #293

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 1 commit into from
Mar 10, 2025

Conversation

hvdijk
Copy link
Contributor

@hvdijk hvdijk commented Mar 10, 2025

  • If building level_zero as a subproject, do not build with warnings as errors, leave it up to the parent project to turn these into errors if desired.
  • If building level_zero with CMake 3.24 or newer, use CMAKE_COMPILE_WARNING_AS_ERROR instead of explicitly setting -Werror. This permits users to turn it off with cmake --compile-no-warning-as-error.

In both cases, being able to disable -Werror is useful when a parent project or a user wishes to turn on additional warnings that should not be turned into errors.

* If building level_zero as a subproject, do not build with warnings as
  errors, leave it up to the parent project to turn these into errors if
  desired.
* If building level_zero with CMake 3.24 or newer, use
  CMAKE_COMPILE_WARNING_AS_ERROR instead of explicitly setting -Werror.
  This permits users to turn it off with `cmake
  --compile-no-warning-as-error`.

In both cases, being able to disable -Werror is useful when a parent
project or a user wishes to turn on additional warnings that should not
be turned into errors.

Signed-off-by: Harald van Dijk <[email protected]>
@hvdijk
Copy link
Contributor Author

hvdijk commented Mar 10, 2025

This came up when trying to build DPC++ with additional warnings, in order to see where those would trigger in other parts of DPC++. The build just completely broke because of the -Werror in level zero, I hope it is acceptable to have a way to turn it off like this.

@nrspruit nrspruit merged commit d1baac0 into oneapi-src:master Mar 10, 2025
49 checks passed
@hvdijk hvdijk deleted the compile-warning-as-error branch March 17, 2025 11:44
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