diff options
author | Dmitry K <winsvega@mail.ru> | 2016-08-02 16:11:09 +0800 |
---|---|---|
committer | Dmitry K <winsvega@mail.ru> | 2016-08-02 16:11:09 +0800 |
commit | a10b6f92f97bf2eacc80534f6640e08f0b26e95d (patch) | |
tree | ffb7d72d52ae7a8d30194186bc15886c10118c5a /cmake/EthPolicy.cmake | |
parent | d1c744450965644df17fcc73006dd7495e75c477 (diff) | |
parent | 85a61fe886c2d99d397bf30cc01d971558130287 (diff) | |
download | dexon-solidity-a10b6f92f97bf2eacc80534f6640e08f0b26e95d.tar.gz dexon-solidity-a10b6f92f97bf2eacc80534f6640e08f0b26e95d.tar.zst dexon-solidity-a10b6f92f97bf2eacc80534f6640e08f0b26e95d.zip |
Merge branch 'develop' of https://github.com/ethereum/solidity into develop
Diffstat (limited to 'cmake/EthPolicy.cmake')
-rw-r--r-- | cmake/EthPolicy.cmake | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/cmake/EthPolicy.cmake b/cmake/EthPolicy.cmake new file mode 100644 index 00000000..31b09f15 --- /dev/null +++ b/cmake/EthPolicy.cmake @@ -0,0 +1,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() + |