forked from ethereum/solidity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
EthPolicy.cmake
35 lines (29 loc) · 1.06 KB
/
EthPolicy.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# it must be a macro cause policies have scopes
# http://www.cmake.org/cmake/help/v3.0/command/cmake_policy.html
macro (eth_policy)
# link_directories() treats paths relative to the source dir.
cmake_policy(SET CMP0015 NEW)
# Avoid warnings in CMake 3.0.2:
cmake_policy(SET CMP0042 NEW)
cmake_policy(SET CMP0043 NEW)
# allow VERSION argument in project()
cmake_policy(SET CMP0048 NEW)
if (POLICY CMP0054)
# do not interpret if() arguments as variables!
cmake_policy(SET CMP0054 NEW)
endif()
if (POLICY CMP0091)
# Allow selecting MSVC runtime library using CMAKE_MSVC_RUNTIME_LIBRARY.
cmake_policy(SET CMP0091 NEW)
endif()
# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:
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()