[tarantool-patches] [PATCH] Enable 0069 policy
AKhatskevich
avkhatskevich at tarantool.org
Thu Oct 11 19:12:48 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 c129b77..9e41751 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,12 @@
project(msgpuck)
cmake_minimum_required(VERSION 2.8.5)
+# 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(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -fPIC -fstrict-aliasing")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -Werror")
--
2.14.1
More information about the Tarantool-patches
mailing list