EthPolicy.cmake 866 B

123456789101112131415161718192021222324252627282930313233343536
  1. # it must be a macro cause policies have scopes
  2. # http://www.cmake.org/cmake/help/v3.0/command/cmake_policy.html
  3. macro (eth_policy)
  4. # link_directories() treats paths relative to the source dir.
  5. cmake_policy(SET CMP0015 NEW)
  6. # let cmake autolink dependencies on windows
  7. cmake_policy(SET CMP0020 NEW)
  8. # CMake 2.8.12 and lower allowed the use of targets and files with double
  9. # colons in target_link_libraries,
  10. # cmake_policy(SET CMP0028 OLD)
  11. if (${CMAKE_VERSION} VERSION_GREATER 3.0)
  12. # fix MACOSX_RPATH
  13. # cmake_policy(SET CMP0042 OLD)
  14. # ignore COMPILE_DEFINITIONS_<Config> properties
  15. cmake_policy(SET CMP0043 OLD)
  16. # allow VERSION argument in project()
  17. cmake_policy(SET CMP0048 NEW)
  18. endif()
  19. if (${CMAKE_VERSION} VERSION_GREATER 3.1)
  20. # do not interpret if() arguments as variables!
  21. cmake_policy(SET CMP0054 NEW)
  22. endif()
  23. endmacro()