Форматирование кода
This commit is contained in:
parent
8d2809a772
commit
f0a7996d26
@ -24,8 +24,10 @@ endif()
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Profile)
|
||||
# Ключи компиляции для режима профилирования в зависимости от типа компилятора
|
||||
if(CMAKE_CXX_COMPILER_IS_Clang OR CMAKE_CXX_COMPILER_IS_GCC)
|
||||
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE} -ggdb -pg -fno-omit-frame-pointer" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE} -ggdb -pg -fno-omit-frame-pointer" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE} -ggdb -pg -fno-omit-frame-pointer" CACHE STRING ""
|
||||
FORCE)
|
||||
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE} -ggdb -pg -fno-omit-frame-pointer" CACHE STRING
|
||||
"" FORCE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -pg" CACHE STRING "" FORCE)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -pg" CACHE STRING "" FORCE)
|
||||
set(CMAKE_STATIC_LINKER_FLAGS_PROFILE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} -pg" CACHE STRING "" FORCE)
|
||||
|
@ -50,7 +50,6 @@ if(CMLIB_COMPACT_SOURCE_PACKAGE)
|
||||
"\\\\.gitlab-ci.yml$")
|
||||
endif()
|
||||
|
||||
|
||||
set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_CURRENT_LIST_DIR}/CMLibCPackProject.cmake)
|
||||
|
||||
# Правила для сборки пакетов для Debian
|
||||
|
@ -22,8 +22,7 @@ function(add_clang_analyze_check target)
|
||||
if(NOT TARGET clang-analyze-check)
|
||||
add_custom_target(clang-analyze-check)
|
||||
endif()
|
||||
add_custom_target(
|
||||
clang-analyze-check-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
add_custom_target(clang-analyze-check-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND ${CLANG_CHECK_EXE} ${_args} -p ${CMAKE_BINARY_DIR} ${_sources})
|
||||
add_dependencies(clang-analyze-check-${target} ${target})
|
||||
add_dependencies(clang-analyze-check clang-analyze-check-${target})
|
||||
|
@ -22,8 +22,7 @@ function(add_clang_tidy_check target)
|
||||
if(NOT TARGET clang-tidy-check)
|
||||
add_custom_target(clang-tidy-check)
|
||||
endif()
|
||||
add_custom_target(
|
||||
clang-tidy-check-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
add_custom_target(clang-tidy-check-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND ${CLANG_TIDY_EXE} ${_args} -p ${CMAKE_BINARY_DIR} ${_sources})
|
||||
add_dependencies(clang-tidy-check-${target} ${target})
|
||||
add_dependencies(clang-tidy-check clang-tidy-check-${target})
|
||||
|
@ -2,15 +2,15 @@ function(add_clazy_check target)
|
||||
find_program(CLAZY_EXE NAMES clazy-standalone)
|
||||
set(_sources ${ARGN})
|
||||
set(_clazy_checks
|
||||
"container-inside-loop,heap-allocated-small-trivial-type,inefficient-qlist,isempty-vs-count,qt-keywords,unneeded-cast")
|
||||
"container-inside-loop,heap-allocated-small-trivial-type,inefficient-qlist,isempty-vs-count,qt-keywords,unneeded-cast"
|
||||
)
|
||||
set(_args -checks=level2,${_clazy_checks} -extra-arg="-Wno-unknown-warning-option")
|
||||
|
||||
if(CLAZY_EXE)
|
||||
if(NOT TARGET clazy-check)
|
||||
add_custom_target(clazy-check)
|
||||
endif()
|
||||
add_custom_target(
|
||||
clazy-check-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
add_custom_target(clazy-check-${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND ${CLAZY_EXE} ${_args} -p ${CMAKE_BINARY_DIR} ${_sources})
|
||||
add_dependencies(clazy-check-${target} ${target})
|
||||
add_dependencies(clazy-check clazy-check-${target})
|
||||
|
@ -17,4 +17,3 @@ endif()
|
||||
if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
||||
message(FATAL_ERROR "Required variable CPACK_PACKAGE_DESCRIPTION_SUMMARY is not defined")
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user