-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Enable CMake Flag -W3
as New CMP0092 no Longer Does it Implicitly
#97053
Conversation
CMP0092 no longer adds it by default, and we use it.
Tagging subscribers to this area: @hoyosjs Issue DetailsResolves #96815. Starting on CMake 3.15, the warning flag
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already remove the /W3
flag in eng/native/configurecompiler.cmake. We can change this PR to just remove the removal.
runtime/eng/native/configurecompiler.cmake
Lines 770 to 772 in c6966d9
# /W3 is added by default by CMake, so remove it | |
string(REPLACE "/W3" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") | |
string(REPLACE "/W3" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") |
configuration. So no need to add another W3, just remove that removal.
Failure is unrelated and is being tracked in issue #97103. Merging this now. |
…otnet#97053) * Add universal `-W3` option to CMakeLists.txt, as the new policy CMP0092 no longer adds it by default, and we use it. * Had not noticed there was already a W3 removal in the compilers' configuration. So no need to add another W3, just remove that removal.
Resolves #96815. Starting on CMake 3.15, the warning flag
-W3
is no longer added by default. We now have a minimum version of 3.20, and we would like to keep this warning enabled, so this PR addresses this.