blob: 31b09f154eb8b1340395d70fe7e3ba0d3db2b091 (
plain) (
blame)
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)
# let cmake autolink dependencies on windows
cmake_policy(SET CMP0020 NEW)
# CMake 2.8.12 and lower allowed the use of targets and files with double
# colons in target_link_libraries,
cmake_policy(SET CMP0028 OLD)
if (${CMAKE_VERSION} VERSION_GREATER 3.0)
# fix MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
# ignore COMPILE_DEFINITIONS_<Config> properties
cmake_policy(SET CMP0043 OLD)
# allow VERSION argument in project()
cmake_policy(SET CMP0048 NEW)
endif()
if (${CMAKE_VERSION} VERSION_GREATER 3.1)
# do not interpret if() arguments as variables!
cmake_policy(SET CMP0054 NEW)
endif()
endmacro()
|