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 18E1E2D081 for ; Thu, 11 Oct 2018 12:14:45 -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 UxCXlcPVq8Ap for ; Thu, 11 Oct 2018 12:14:45 -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 CB7062CEEE for ; Thu, 11 Oct 2018 12:14:44 -0400 (EDT) From: AKhatskevich Subject: [tarantool-patches] [tarantool-small] Enable 0069 policy Date: Thu, 11 Oct 2018 19:14:38 +0300 Message-Id: <20181011161438.8916-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 ad27423..8094023 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,12 @@ project(small C CXX) cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +# 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() + if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -- 2.14.1