Merge pull request #13460 from Pospelove/patch-1

Set CMake policy `CMP0115` to `NEW`: "Source file extensions must be explicit"
This commit is contained in:
Daniel Kirchner 2022-09-01 13:07:01 +02:00 committed by GitHub
commit 5192965229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,4 +25,11 @@ macro (eth_policy)
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()
if(POLICY CMP0115)
# Require explicit extensions for source files, do not guess.
# The extra calls to GetFileAttributesW significantly slow down cmake on Windows.
# https://gitlab.kitware.com/cmake/cmake/-/issues/23154
cmake_policy(SET CMP0115 NEW)
endif()
endmacro()