2016-09-25 16:19:39 -04:00
|
|
|
#############################################################################
|
2020-05-17 13:41:12 -04:00
|
|
|
# Name: build/cmake/policies.cmake
|
2016-09-25 16:19:39 -04:00
|
|
|
# Purpose: CMake policies for wxWidgets
|
|
|
|
# Author: Tobias Taschner
|
|
|
|
# Created: 2016-10-21
|
|
|
|
# Copyright: (c) 2016 wxWidgets development team
|
|
|
|
# Licence: wxWindows licence
|
|
|
|
#############################################################################
|
|
|
|
|
2018-01-24 10:24:28 -05:00
|
|
|
# Please keep the policies in the order of their numbers.
|
|
|
|
|
2016-09-25 16:19:39 -04:00
|
|
|
if(POLICY CMP0025)
|
2020-05-24 16:02:48 -04:00
|
|
|
# Compiler id for Apple Clang is now AppleClang.
|
2018-01-24 10:23:45 -05:00
|
|
|
cmake_policy(SET CMP0025 NEW)
|
2016-09-25 16:19:39 -04:00
|
|
|
endif()
|
|
|
|
|
2020-05-17 13:41:33 -04:00
|
|
|
if(POLICY CMP0028)
|
|
|
|
# Double colon in target name means ALIAS or IMPORTED target.
|
|
|
|
cmake_policy(SET CMP0028 NEW)
|
|
|
|
endif()
|
|
|
|
|
2016-09-25 16:19:39 -04:00
|
|
|
if(POLICY CMP0038)
|
2020-05-24 16:02:48 -04:00
|
|
|
# Targets may not link directly to themselves.
|
2018-01-24 10:23:45 -05:00
|
|
|
cmake_policy(SET CMP0038 NEW)
|
2016-09-25 16:19:39 -04:00
|
|
|
endif()
|
|
|
|
|
2018-01-24 10:24:28 -05:00
|
|
|
if(POLICY CMP0042)
|
|
|
|
# MACOSX_RPATH is enabled by default.
|
|
|
|
cmake_policy(SET CMP0042 NEW)
|
|
|
|
endif()
|
|
|
|
|
2016-09-25 16:19:39 -04:00
|
|
|
if(POLICY CMP0045)
|
2020-05-24 16:02:48 -04:00
|
|
|
# Error on non-existent target in get_target_property.
|
2018-01-24 10:23:45 -05:00
|
|
|
cmake_policy(SET CMP0045 NEW)
|
2016-09-25 16:19:39 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(POLICY CMP0046)
|
2020-05-24 16:02:48 -04:00
|
|
|
# Error on non-existent dependency in add_dependencies.
|
2018-01-24 10:23:45 -05:00
|
|
|
cmake_policy(SET CMP0046 NEW)
|
2016-09-25 16:19:39 -04:00
|
|
|
endif()
|
|
|
|
|
2020-05-24 16:02:48 -04:00
|
|
|
if(POLICY CMP0048)
|
|
|
|
# The project() command manages VERSION variables.
|
|
|
|
cmake_policy(SET CMP0048 NEW)
|
|
|
|
endif()
|
|
|
|
|
2016-09-25 16:19:39 -04:00
|
|
|
if(POLICY CMP0049)
|
2020-05-24 16:02:48 -04:00
|
|
|
# Do not expand variables in target source entries.
|
2018-01-24 10:23:45 -05:00
|
|
|
cmake_policy(SET CMP0049 NEW)
|
2016-09-25 16:19:39 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(POLICY CMP0053)
|
2020-05-24 16:02:48 -04:00
|
|
|
# Simplify variable reference and escape sequence evaluation.
|
2018-01-24 10:23:45 -05:00
|
|
|
cmake_policy(SET CMP0053 NEW)
|
2016-09-25 16:19:39 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(POLICY CMP0054)
|
2020-05-24 16:02:48 -04:00
|
|
|
# Only interpret if() arguments as variables or keywords when unquoted.
|
2018-01-24 10:23:45 -05:00
|
|
|
cmake_policy(SET CMP0054 NEW)
|
2016-09-25 16:19:39 -04:00
|
|
|
endif()
|
2018-01-24 10:25:28 -05:00
|
|
|
|
2020-12-26 09:56:56 -05:00
|
|
|
if(POLICY CMP0060)
|
|
|
|
# Link libraries by full path even in implicit directories.
|
|
|
|
cmake_policy(SET CMP0060 NEW)
|
|
|
|
endif()
|
|
|
|
|
2018-01-24 10:25:28 -05:00
|
|
|
if(POLICY CMP0067)
|
|
|
|
# Honor language standard in try_compile() source-file signature.
|
|
|
|
cmake_policy(SET CMP0067 NEW)
|
|
|
|
endif()
|
2018-12-01 07:43:48 -05:00
|
|
|
|
|
|
|
if(POLICY CMP0072)
|
|
|
|
# FindOpenGL prefers GLVND by default when available.
|
|
|
|
cmake_policy(SET CMP0072 NEW)
|
|
|
|
endif()
|
2019-07-16 19:12:33 -04:00
|
|
|
|
|
|
|
if(POLICY CMP0092)
|
2020-05-24 16:02:48 -04:00
|
|
|
# MSVC warning flags are not in CMAKE_<LANG>_FLAGS by default.
|
2019-07-16 19:12:33 -04:00
|
|
|
cmake_policy(SET CMP0092 NEW)
|
|
|
|
endif()
|