[x265] [PATCH] cmake: fix policy CMP0054 warning for cmake version > 3.0

dnyaneshwar at multicorewareinc.com dnyaneshwar at multicorewareinc.com
Fri Mar 20 13:29:09 CET 2015


# HG changeset patch
# User Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
# Date 1426854479 -19800
#      Fri Mar 20 17:57:59 2015 +0530
# Node ID c78dcd61610f48e1c6106d1ff4fbfb87b2e437b7
# Parent  ee667a53aeb475c5d14a75f1d537111e5654ff79
cmake: fix policy CMP0054 warning for cmake version > 3.0

CMake 3.1 and above no longer dereference variables or interpret keywords
in an ``if()`` command argument when it is a :ref:`Quoted Argument`
or a :ref:`Bracket Argument`.

The OLD behavior for this policy is to dereference variables and
interpret keywords even if they are quoted or bracketed.
The ``NEW`` behavior is to not dereference variables or interpret keywords
that have been quoted or bracketed.

diff -r ee667a53aeb4 -r c78dcd61610f source/CMakeLists.txt
--- a/source/CMakeLists.txt	Thu Mar 19 20:56:29 2015 -0500
+++ b/source/CMakeLists.txt	Fri Mar 20 17:57:59 2015 +0530
@@ -20,6 +20,10 @@
 include(CheckSymbolExists)
 include(CheckCXXCompilerFlag)
 
+if(CMAKE_VERSION VERSION_GREATER "3.0")
+    cmake_policy(SET CMP0054 OLD)
+endif()
+
 # X265_BUILD must be incremented each time the public API is changed
 set(X265_BUILD 49)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"


More information about the x265-devel mailing list