File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,13 +17,16 @@ if(POLICY CMP0022)
1717 cmake_policy (SET CMP0022 NEW ) # automatic when 2.8.12 is required
1818endif ()
1919
20- if (POLICY CMP0051)
21- # CMake 3.1 and higher include generator expressions of the form
22- # $<TARGETLIB:obj> in the SOURCES property. These need to be
23- # stripped everywhere that access the SOURCES property, so we just
24- # defer to the OLD behavior of not including generator expressions
25- # in the output for now.
26- cmake_policy (SET CMP0051 OLD )
20+ # CMake version 3.1.0 removed support for setting Policy CMP0051 to OLD
21+ if (CMAKE_VERSION VERSION_LESS "3.1.0" )
22+ if (POLICY CMP0051)
23+ # CMake 3.1 and higher include generator expressions of the form
24+ # $<TARGETLIB:obj> in the SOURCES property. These need to be
25+ # stripped everywhere that access the SOURCES property, so we just
26+ # defer to the OLD behavior of not including generator expressions
27+ # in the output for now.
28+ cmake_policy (SET CMP0051 OLD )
29+ endif ()
2730endif ()
2831
2932if (CMAKE_VERSION VERSION_LESS 3.1.20141117)
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 2.8.8 )
1+ # Support for CMake versions <3.5 is removed in versions >3.20
2+ if (${CMAKE_VERSION} VERSION_LESS "3.20" )
3+ cmake_minimum_required (VERSION 2.8.8 )
4+ else ()
5+ cmake_minimum_required (VERSION 3.5 )
6+ endif ()
27
38# FIXME: It may be removed when we use 2.8.12.
49if (CMAKE_VERSION VERSION_LESS 2.8.12)
You can’t perform that action at this time.
0 commit comments