Skip to content

Conversation

@tannergooding
Copy link
Member

As per https://cmake.org/cmake/help/v3.21/policy/CMP0066.html and https://cmake.org/cmake/help/v3.21/policy/CMP0067.html, the default policy for these is OLD meaning that try_compile checks (such as is done for check_c_source_compiles) will not respect CMAKE_<LANG>_FLAGS, CMAKE_<LANG>_STANDARD, CMAKE_<LANG>_STANDARD_REQUIRED, and CMAKE_<LANG>_EXTENSIONS variables.

The net effect of this is that certain header or other checks may be misreported between the test and what we ultimately compile our source with and may cause less efficient code or other downstream failures such as #56746.

This resolves #56746 by ensuring that these policies are explicitly set to NEW so that the cmake tests match our source compilation configuration and are accurate.

@ghost
Copy link

ghost commented Aug 4, 2021

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

Issue Details

As per https://cmake.org/cmake/help/v3.21/policy/CMP0066.html and https://cmake.org/cmake/help/v3.21/policy/CMP0067.html, the default policy for these is OLD meaning that try_compile checks (such as is done for check_c_source_compiles) will not respect CMAKE_<LANG>_FLAGS, CMAKE_<LANG>_STANDARD, CMAKE_<LANG>_STANDARD_REQUIRED, and CMAKE_<LANG>_EXTENSIONS variables.

The net effect of this is that certain header or other checks may be misreported between the test and what we ultimately compile our source with and may cause less efficient code or other downstream failures such as #56746.

This resolves #56746 by ensuring that these policies are explicitly set to NEW so that the cmake tests match our source compilation configuration and are accurate.

Author: tannergooding
Assignees: -
Labels:

area-Infrastructure-coreclr

Milestone: -

@tannergooding
Copy link
Member Author

@jkoritzinsky, any other sign-off needed here or can we merge?

@jkoritzinsky
Copy link
Member

I think we can merge this

@tannergooding tannergooding merged commit 571b4b4 into dotnet:main Aug 4, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 3, 2021
@tannergooding tannergooding deleted the fix-56746 branch November 11, 2022 15:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building with the Win11 Insider SDK installed fails the build

2 participants