[tarantool-patches] [tarantool-libyaml] Enable 0069 policy

AKhatskevich avkhatskevich at tarantool.org
Thu Oct 11 19:15:56 MSK 2018


From: AKhatskevich <avkhatskevich at gmail.com>

Without this policy cmake >= 3.9 produces warnings when its parent
project uses LTO.
---
 CMakeLists.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e20a494..362e33f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,12 @@
 cmake_minimum_required(VERSION 2.8)
 project (yaml C)
 
+# Avoid warnings when building with cmake>=3.9 and LTO is enabled in parent
+# project.
+if(NOT CMAKE_VERSION VERSION_LESS 3.9)
+    cmake_policy(SET CMP0069 NEW)
+endif()
+
 set (YAML_VERSION_MAJOR 0)
 set (YAML_VERSION_MINOR 1)
 set (YAML_VERSION_PATCH 7)
-- 
2.14.1





More information about the Tarantool-patches mailing list