From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 197112BFF3 for ; Thu, 11 Oct 2018 12:19:00 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QzneDS9OM_xH for ; Thu, 11 Oct 2018 12:18:59 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 0E2812D0CC for ; Thu, 11 Oct 2018 12:18:42 -0400 (EDT) From: AKhatskevich Subject: [tarantool-patches] [tarantool-msgpuck] Enable 0069 policy Date: Thu, 11 Oct 2018 19:18:38 +0300 Message-Id: <20181011161838.9213-1-avkhatskevich@tarantool.org> In-Reply-To: References: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: alexander.turenko@tarantool.org, tarantool-patches@freelists.org Cc: AKhatskevich From: AKhatskevich 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