cmake doesn't has POLICY CMP0054 in low version

(cherry picked from commit 3f19c5eb8335500ca6f0dd3b62c32d06103757d0)
This commit is contained in:
lightningkay 2017-11-02 14:58:17 +08:00 committed by Azat Khuzhin
parent 23eb38b971
commit 4a2373eec0
No known key found for this signature in database
GPG Key ID: B86086848EF8686D

View File

@ -23,7 +23,10 @@ if (APPLE)
else()
cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR)
endif()
cmake_policy(SET CMP0054 NEW)
if (POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release