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 25A7F2475A for ; Tue, 23 Jul 2019 04:30:07 -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 QjdPSsNyRHk8 for ; Tue, 23 Jul 2019 04:30:07 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 D6D5224752 for ; Tue, 23 Jul 2019 04:30:06 -0400 (EDT) Date: Tue, 23 Jul 2019 11:29:48 +0300 From: Alexander Turenko Subject: [tarantool-patches] Re: [PATCH] cmake: make sure yaml is built statically when used in tarantool Message-ID: <20190723082948.wkem5pvsz5omrb56@tkn_work_nb> References: <20190722214709.48100-1-sergepetrenko@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190722214709.48100-1-sergepetrenko@tarantool.org> 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: Serge Petrenko Cc: tarantool-patches@freelists.org, Kirill Yukhin I don't have objections. LGTM. Kirill, please, proceed. WBR, Alexander Turenko. On Tue, Jul 23, 2019 at 12:47:09AM +0300, Serge Petrenko wrote: > Follow-up tarantool/tarantool#4090 > --- > https://github.com/tarantool/libyaml/tree/sp/static-linking > https://github.com/tarantool/tarantool/issues/4090 > > CMakeLists.txt | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/CMakeLists.txt b/CMakeLists.txt > index 2cc8ccf..6d3ed0f 100644 > --- a/CMakeLists.txt > +++ b/CMakeLists.txt > @@ -52,9 +52,13 @@ configure_file( > ${config_h} > ) > > -add_library(yaml ${SRCS}) > +if(ENABLE_BUNDLED_LIBYAML) > + add_library(yaml STATIC ${SRCS}) > +else() > + add_library(yaml ${SRCS}) > +endif() > > -if(NOT BUILD_SHARED_LIBS) > +if(NOT BUILD_SHARED_LIBS OR ENABLE_BUNDLED_LIBYAML) > set_target_properties(yaml > PROPERTIES OUTPUT_NAME yaml_static > ) > @@ -67,7 +71,7 @@ set_target_properties(yaml > target_compile_definitions(yaml > PRIVATE HAVE_CONFIG_H > PUBLIC > - $<$>:YAML_DECLARE_STATIC> > + $<$>,$>:YAML_DECLARE_STATIC> > $<$:_CRT_SECURE_NO_WARNINGS> > ) > > -- > 2.20.1 (Apple Git-117) >