From ef788f6cc506f580466b1481c21bd59f91a830f3 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Thu, 25 Jun 2020 12:22:35 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D1=80=D1=83=D0=B3=D0=BE=D0=B9=20=D1=81?= =?UTF-8?q?=D0=BF=D0=BE=D1=81=D0=BE=D0=B1=20=D1=83=D1=81=D1=82=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=BA=D0=B8=20=D1=84=D0=BB=D0=B0=D0=B3=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCommonTargetProperties.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMLibCommonTargetProperties.cmake b/CMLibCommonTargetProperties.cmake index ac24f19..2e64c79 100644 --- a/CMLibCommonTargetProperties.cmake +++ b/CMLibCommonTargetProperties.cmake @@ -58,10 +58,10 @@ function(common_target_properties target) check_cxx_compiler_flag(-flto CXX_HAS_LTO_FLAG) check_cxx_compiler_flag(-fno-fat-lto-objects CXX_HAS_NO_FAT_LTO_FLAG) if(CXX_HAS_LTO_FLAG) - target_compile_options(${target} PUBLIC "-flto") + target_compile_options(${target} PUBLIC "$<$:-flto>") set_target_properties(${target} PROPERTIES LINK_FLAGS_RELEASE "-flto") if(CXX_HAS_NO_FAT_LTO_FLAG) - target_compile_options(${target} PUBLIC "-fno-fat-lto-objects") + target_compile_options(${target} PUBLIC "$<$:-fno-fat-lto-objects>") set_target_properties(${target} PROPERTIES LINK_FLAGS_RELEASE "-fno-fat-lto-objects") endif() endif()