Unverified Commit f2e9dc55 authored by Rafael Kitover's avatar Rafael Kitover
Browse files

cmake: check for policy CMP0077 existence



Check `if(POLICY CMP0077)` before trying to set it, because setting a
policy a version of cmake does not know about is an error.
Signed-off-by: default avatarRafael Kitover <rkitover@gmail.com>
parent ae38a70d
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW) # link to full path of libs
cmake_policy(SET CMP0005 NEW) # escapes in add_definitions
cmake_policy(SET CMP0077 NEW) # use vars for options
if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW) # use vars for options
endif()
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
cmake_policy(SET CMP0043 NEW) # for wxWidgets, use generator expressions
......
......@@ -3,7 +3,10 @@
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW) # link to full path of libs
cmake_policy(SET CMP0005 NEW) # escapes in add_definitions
cmake_policy(SET CMP0077 NEW) # use vars for options
if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW) # use vars for options
endif()
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
cmake_policy(SET CMP0043 NEW) # for wxWidgets, use generator expressions
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment