Добавление флагов в виде строк
This commit is contained in:
		| @@ -7,7 +7,7 @@ function(add_code_coverage target) | ||||
|   if(CMLIB_ENABLE_CODE_COVERAGE) | ||||
|     if(CMAKE_CXX_COMPILER_IS_GCC) | ||||
|       target_compile_options(${target} PUBLIC "--coverage") | ||||
|       set_property(TARGET ${target} APPEND PROPERTY LINK_FLAGS "--coverage") | ||||
|       set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " --coverage") | ||||
|  | ||||
|       if(LCOV_EXE) | ||||
|         add_custom_target( | ||||
|   | ||||
| @@ -51,7 +51,7 @@ function(common_target_properties target) | ||||
|       endif() | ||||
|     endif() | ||||
|     if(CMAKE_CXX_COMPILER_IS_GCC AND NOT APPLE) | ||||
|       set_property(TARGET ${target} APPEND PROPERTY LINK_FLAGS "-Wl,--no-as-needed") | ||||
|       set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--no-as-needed") | ||||
|     endif() | ||||
|   endif() | ||||
|  | ||||
| @@ -61,10 +61,10 @@ function(common_target_properties target) | ||||
|     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") | ||||
|       set_property(TARGET ${target} APPEND PROPERTY LINK_FLAGS "-flto") | ||||
|       set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " -flto") | ||||
|       if(CXX_HAS_NO_FAT_LTO_FLAG) | ||||
|         target_compile_options(${target} PUBLIC "-fno-fat-lto-objects") | ||||
|         set_property(TARGET ${target} APPEND PROPERTY LINK_FLAGS "-fno-fat-lto-objects") | ||||
|         set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " -fno-fat-lto-objects") | ||||
|       endif() | ||||
|     endif() | ||||
|   endif() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user