From 86f57f11c677473cf48d14b02e61500ee75464e7 Mon Sep 17 00:00:00 2001 From: Vladimir Timofeev Date: Mon, 26 Jan 2015 10:15:41 +0300 Subject: [PATCH] cmake: eliminate warning about policy on cmake 3.1 --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 56031ede6653..69bc337a7149 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,12 @@ cmake_minimum_required(VERSION 2.8) # also from cmake's Modules dir, to not clash with per-project files. cmake_policy(SET CMP0017 NEW) +# Use new behaviour with cmake >= 3.0: +# Only interpret if() arguments as variables or keywords when unquoted. +if(CMAKE_VERSION VERSION_GREATER 3) + cmake_policy(SET CMP0054 NEW) +endif() + project (Cocos2d-X) # The version number