From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [94.100.177.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 705EC42F4AD for ; Tue, 16 Jun 2020 01:19:38 +0300 (MSK) References: <157801d6432b$5f77cdb0$1e676910$@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Tue, 16 Jun 2020 00:19:36 +0200 MIME-Version: 1.0 In-Reply-To: <157801d6432b$5f77cdb0$1e676910$@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 2/2] cmake: split UB sanitations into separate flags. List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Timur Safin , tarantool-patches@dev.tarantool.org Hi! Thanks for the review! > : diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake > : index 6c0fa635c..6de8219a0 100644 > : --- a/cmake/compiler.cmake > : +++ b/cmake/compiler.cmake > : @@ -269,19 +269,55 @@ macro(enable_tnt_compile_flags) > : if (NOT CMAKE_COMPILER_IS_CLANG) > : message(FATAL_ERROR "Undefined behaviour sanitizer only > : available for clang") > : else() > : - set(SANITIZE_FLAGS "-fsanitize=undefined -fno-sanitize- > : recover=undefined") > : + string(JOIN "," SANITIZE_FLAGS > : + "alignment" > : + "bool" > : + "bounds" > : + "builtin" > : + "enum" > : + "float-cast-overflow" > : + "float-divide-by-zero" > : + "function" > : + "integer-divide-by-zero" > : + "return" > : + "shift" > : + "unreachable" > : + "vla-bound" > : + ) > : + > > You know, every time I see (unnecessary) quoted strings inside of cmake > lists I want to run and fix it immediately. Because there is no actual > need to quote them - in cmake almost everything is string literal at the end > > Thus I tried to make this construction compacter and less verbose, e.g. I didn't know the quotes are not needed. Nice! Applied your diff.