Форматирование

This commit is contained in:
Andrei Astafev 2021-05-30 20:32:08 +03:00
parent 28cf80381e
commit ec1d917195
5 changed files with 17 additions and 19 deletions

View File

@ -35,8 +35,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Profile)
CACHE STRING "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${_gcc_profile_flags}"
CACHE STRING "" FORCE)
set(CMAKE_STATIC_LINKER_FLAGS_PROFILE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE}"
CACHE STRING "" FORCE)
set(CMAKE_STATIC_LINKER_FLAGS_PROFILE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE}" CACHE STRING "" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS_PROFILE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} ${_gcc_profile_flags}"
CACHE STRING "" FORCE)
elseif(CMAKE_CXX_COMPILER_IS_Intel)

View File

@ -69,9 +69,12 @@ function(common_target_properties target)
endif()
endif()
set_property(TARGET ${target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER
${CMLIB_COTIRE_ENABLE_PRECOMPILED_HEADER})
set_property(TARGET ${target} PROPERTY COTIRE_ADD_UNITY_BUILD ${CMLIB_COTIRE_ADD_UNITY_BUILD})
# cmake-format: off
set_property(TARGET ${target}
PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER ${CMLIB_COTIRE_ENABLE_PRECOMPILED_HEADER})
set_property(TARGET ${target}
PROPERTY COTIRE_ADD_UNITY_BUILD ${CMLIB_COTIRE_ADD_UNITY_BUILD})
# cmake-format: on
if(CMAKE_BUILD_TYPE STREQUAL Profile)
target_compile_definitions(${target} ${__visibility} PROFILE)
@ -82,9 +85,6 @@ function(common_target_properties target)
elseif(CMAKE_BUILD_TYPE STREQUAL None)
target_compile_definitions(${target} ${__visibility} ANALYSIS)
endif()
target_compile_definitions(
${target}
${__visibility}
"TARGET_LSB_ID_${LSB_DISTRIBUTOR_ID}"
"TARGET_LSB_CODENAME_${LSB_CODENAME}")
target_compile_definitions(${target} ${__visibility} "TARGET_LSB_ID_${LSB_DISTRIBUTOR_ID}")
target_compile_definitions(${target} ${__visibility} "TARGET_LSB_CODENAME_${LSB_CODENAME}")
endfunction()

View File

@ -43,4 +43,3 @@ endif()
if(Qt5Core_DIR)
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DQt5Core_DIR=${Qt5Core_DIR})
endif()

View File

@ -6,9 +6,9 @@ endfunction()
# Добавление общего префикса ко всем переменным в списке
function(list_transform_prepend var prefix)
set(temp "")
foreach(f ${${var}})
list(APPEND temp "${prefix}${f}")
endforeach()
set(${var} "${temp}" PARENT_SCOPE)
set(temp "")
foreach(f ${${var}})
list(APPEND temp "${prefix}${f}")
endforeach()
set(${var} "${temp}" PARENT_SCOPE)
endfunction()

View File

@ -18,12 +18,12 @@ else()
find_program(_lsb_release_executable lsb_release)
if(_lsb_release_executable)
execute_process(COMMAND ${_lsb_release_executable} -si OUTPUT_VARIABLE LSB_DISTRIBUTOR_ID
OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${_lsb_release_executable} -sc OUTPUT_VARIABLE LSB_CODENAME
OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${_lsb_release_executable} -sr OUTPUT_VARIABLE LSB_RELEASE
OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
endif()