Compare commits

..

No commits in common. "cdb009ad602f1f3f5b06e62370408b779ec4c8de" and "f9143e9a4ba5f8b3bb66668ae9e4365815b9cf84" have entirely different histories.

4 changed files with 82 additions and 203 deletions

View File

@ -1,4 +1,4 @@
# Uncrustify-0.75.0_f
# Uncrustify-0.74.0_f
#
# General options
@ -127,11 +127,6 @@ sp_before_assign = force # ignore/add/remove/force/not_defined
# Overrides sp_assign.
sp_after_assign = force # ignore/add/remove/force/not_defined
# Add or remove space in 'enum {'.
#
# Default: add
sp_enum_brace = force # ignore/add/remove/force/not_defined
# Add or remove space in 'NS_ENUM ('.
sp_enum_paren = ignore # ignore/add/remove/force/not_defined
@ -223,10 +218,6 @@ sp_after_ptr_star_trailing = ignore # ignore/add/remove/force/not_defined
# in a function pointer definition.
sp_ptr_star_func_var = ignore # ignore/add/remove/force/not_defined
# Add or remove space between the pointer star '*' and the name of the type
# in a function pointer type definition.
sp_ptr_star_func_type = remove # ignore/add/remove/force/not_defined
# Add or remove space after a pointer star '*', if followed by an open
# parenthesis, as in 'void* (*)()'.
sp_ptr_star_paren = ignore # ignore/add/remove/force/not_defined
@ -261,10 +252,6 @@ sp_after_byref_func = ignore # ignore/add/remove/force/not_defined
# prototype or function definition.
sp_before_byref_func = ignore # ignore/add/remove/force/not_defined
# Add or remove space after a reference sign '&', if followed by an open
# parenthesis, as in 'char& (*)()'.
sp_byref_paren = force # ignore/add/remove/force/not_defined
# Add or remove space between type and word. In cases where total removal of
# whitespace would be a syntax error, a value of 'remove' is treated the same
# as 'force'.
@ -465,17 +452,14 @@ sp_between_mdatype_commas = ignore # ignore/add/remove/force/not_defined
# Default: force
sp_paren_comma = force # ignore/add/remove/force/not_defined
# Add or remove space between a type and ':'.
sp_type_colon = force # ignore/add/remove/force/not_defined
# Add or remove space after the variadic '...' when preceded by a
# non-punctuator.
# The value REMOVE will be overridden with FORCE
# The value REMOVE will be overriden with FORCE
sp_after_ellipsis = ignore # ignore/add/remove/force/not_defined
# Add or remove space before the variadic '...' when preceded by a
# non-punctuator.
# The value REMOVE will be overridden with FORCE
# The value REMOVE will be overriden with FORCE
sp_before_ellipsis = force # ignore/add/remove/force/not_defined
# Add or remove space between a type and '...'.
@ -484,6 +468,9 @@ sp_type_ellipsis = force # ignore/add/remove/force/not_defined
# Add or remove space between a '*' and '...'.
sp_ptr_type_ellipsis = ignore # ignore/add/remove/force/not_defined
# (D) Add or remove space between a type and '?'.
sp_type_question = ignore # ignore/add/remove/force/not_defined
# Add or remove space between ')' and '...'.
sp_paren_ellipsis = ignore # ignore/add/remove/force/not_defined
@ -803,10 +790,6 @@ sp_d_array_colon = ignore # ignore/add/remove/force/not_defined
# Default: remove
sp_not = remove # ignore/add/remove/force/not_defined
# Add or remove space between two '!' (not) unary operators.
# If set to ignore, sp_not will be used.
sp_not_not = ignore # ignore/add/remove/force/not_defined
# Add or remove space after the '~' (invert) unary operator.
#
# Default: remove
@ -1061,21 +1044,15 @@ force_tab_after_define = false # true/false
# Default: 8
indent_columns = 8 # unsigned number
# Whether to ignore indent for the first continuation line. Subsequent
# continuation lines will still be indented to match the first.
indent_ignore_first_continue = false # true/false
# The continuation indent. If non-zero, this overrides the indent of '(', '['
# and '=' continuation indents. Negative values are OK; negative value is
# absolute and not increased for each '(' or '[' level.
#
# For FreeBSD, this is set to 4.
# Requires indent_ignore_first_continue=false.
indent_continue = 0 # number
# The continuation indent, only for class header line(s). If non-zero, this
# overrides the indent of 'class' continuation indents.
# Requires indent_ignore_first_continue=false.
indent_continue_class_head = 0 # unsigned number
# Whether to indent empty lines (i.e. lines which contain only spaces before
@ -1151,23 +1128,16 @@ indent_namespace_level = 0 # unsigned number
# indented. Requires indent_namespace=true. 0 means no limit.
indent_namespace_limit = 0 # unsigned number
# Whether to indent only in inner namespaces (nested in other namespaces).
# Requires indent_namespace=true.
indent_namespace_inner_only = false # true/false
# Whether the 'extern "C"' body is indented.
indent_extern = false # true/false
# Whether the 'class' body is indented.
indent_class = true # true/false
# Whether to ignore indent for the leading base class colon.
indent_ignore_before_class_colon = true # true/false
# Additional indent before the leading base class colon.
# Negative values decrease indent down to the first column.
# Requires indent_ignore_before_class_colon=false and a newline break before
# the colon (see pos_class_colon and nl_class_colon)
# Requires a newline break before colon (see pos_class_colon
# and nl_class_colon)
indent_before_class_colon = 0 # number
# Whether to indent the stuff after a leading base class colon.
@ -1177,9 +1147,6 @@ indent_class_colon = true # true/false
# colon. Requires indent_class_colon=true.
indent_class_on_colon = true # true/false
# Whether to ignore indent for a leading class initializer colon.
indent_ignore_before_constr_colon = true # true/false
# Whether to indent the stuff after a leading class initializer colon.
indent_constr_colon = false # true/false
@ -1210,12 +1177,9 @@ indent_var_def_blk = 0 # number
# Whether to indent continued variable declarations instead of aligning.
indent_var_def_cont = false # true/false
# How to indent continued shift expressions ('<<' and '>>').
# Set align_left_shift=false when using this.
# 0: Align shift operators instead of indenting them (default)
# 1: Indent by one level
# -1: Preserve original indentation
indent_shift = 0 # number
# Whether to indent continued shift expressions ('<<' and '>>') instead of
# aligning. Set align_left_shift=false when enabling this.
indent_shift = false # true/false
# Whether to force indentation of function definitions to start in column 1.
indent_func_def_force_col1 = false # true/false
@ -1302,9 +1266,6 @@ indent_switch_case = 0 # unsigned number
# Usually the same as indent_columns or indent_switch_case.
indent_switch_body = 0 # unsigned number
# Whether to ignore indent for '{' following 'case'.
indent_ignore_case_brace = false # true/false
# Spaces to indent '{' from 'case'. By default, the brace will appear under
# the 'c' in case. Usually set to 0 or indent_columns. Negative values are OK.
# It might be wise to choose the same value for the option indent_switch_case.
@ -1373,11 +1334,10 @@ indent_paren_nl = false # true/false
# How to indent a close parenthesis after a newline.
#
# 0: Indent to body level (default)
# 1: Align under the open parenthesis
# 2: Indent to the brace level
# -1: Preserve original indentation
indent_paren_close = 0 # number
# 0: Indent to body level (default)
# 1: Align under the open parenthesis
# 2: Indent to the brace level
indent_paren_close = 0 # unsigned number
# Whether to indent the open parenthesis of a function definition,
# if the parenthesis is on its own line.
@ -1391,41 +1351,24 @@ indent_paren_after_func_decl = false # true/false
# if the parenthesis is on its own line.
indent_paren_after_func_call = false # true/false
# How to indent a comma when inside braces.
# 0: Indent by one level (default)
# 1: Align under the open brace
# -1: Preserve original indentation
indent_comma_brace = 0 # number
# Whether to indent a comma when inside a brace.
# If true, aligns under the open brace.
indent_comma_brace = false # true/false
# How to indent a comma when inside parentheses.
# 0: Indent by one level (default)
# 1: Align under the open parenthesis
# -1: Preserve original indentation
indent_comma_paren = 1 # number
# Whether to indent a comma when inside a parenthesis.
# If true, aligns under the open parenthesis.
indent_comma_paren = true # true/false
# How to indent a Boolean operator when inside parentheses.
# 0: Indent by one level (default)
# 1: Align under the open parenthesis
# -1: Preserve original indentation
indent_bool_paren = 0 # number
# Whether to ignore the indentation of a Boolean operator when outside
# parentheses.
indent_ignore_bool = false # true/false
# Whether to ignore the indentation of an arithmetic operator.
indent_ignore_arith = false # true/false
# Whether to indent a Boolean operator when inside a parenthesis.
# If true, aligns under the open parenthesis.
indent_bool_paren = false # true/false
# Whether to indent a semicolon when inside a for parenthesis.
# If true, aligns under the open for parenthesis.
indent_semicolon_for_paren = false # true/false
# Whether to ignore the indentation of a semicolon outside of a 'for'
# statement.
indent_ignore_semicolon = false # true/false
# Whether to align the first expression to following ones
# if indent_bool_paren=1.
# if indent_bool_paren=true.
indent_first_bool_expr = false # true/false
# Whether to align the first expression to following ones
@ -1439,9 +1382,6 @@ indent_square_nl = false # true/false
# (ESQL/C) Whether to preserve the relative indent of 'EXEC SQL' bodies.
indent_preserve_sql = false # true/false
# Whether to ignore the indentation of an assignment operator.
indent_ignore_assign = false # true/false
# Whether to align continued statements at the '='. If false or if the '=' is
# followed by a newline, the next line is indent one tab.
#
@ -2042,8 +1982,7 @@ nl_after_semicolon = false # true/false
nl_paren_dbrace_open = ignore # ignore/add/remove/force/not_defined
# Whether to add a newline after the type in an unnamed temporary
# direct-list-initialization, better:
# before a direct-list-initialization.
# direct-list-initialization.
nl_type_brace_init_lst = ignore # ignore/add/remove/force/not_defined
# Whether to add a newline after the open brace in an unnamed temporary
@ -2283,7 +2222,7 @@ nl_after_func_body_one_liner = 0 # unsigned number
# of a function body.
#
# 0: No change (default).
nl_func_var_def_blk = 1 # unsigned number
nl_func_var_def_blk = 0 # unsigned number
# The number of newlines before a block of typedefs. If nl_after_access_spec
# is non-zero, that option takes precedence.
@ -2294,22 +2233,22 @@ nl_typedef_blk_start = 0 # unsigned number
# The number of newlines after a block of typedefs.
#
# 0: No change (default).
nl_typedef_blk_end = 1 # unsigned number
nl_typedef_blk_end = 0 # unsigned number
# The maximum number of consecutive newlines within a block of typedefs.
#
# 0: No change (default).
nl_typedef_blk_in = 0 # unsigned number
# The number of empty newlines before a block of variable definitions
# not at the top of a function body. If nl_after_access_spec is non-zero,
# that option takes precedence.
# The number of newlines before a block of variable definitions not at the top
# of a function body. If nl_after_access_spec is non-zero, that option takes
# precedence.
#
# 0: No change (default).
nl_var_def_blk_start = 1 # unsigned number
nl_var_def_blk_start = 0 # unsigned number
# The number of empty newlines after a block of variable definitions
# not at the top of a function body.
# The number of newlines after a block of variable definitions not at the top
# of a function body.
#
# 0: No change (default).
nl_var_def_blk_end = 0 # unsigned number
@ -2339,13 +2278,13 @@ nl_after_multiline_comment = false # true/false
nl_after_label_colon = false # true/false
# The number of newlines before a struct definition.
nl_before_struct = 1 # unsigned number
nl_before_struct = 0 # unsigned number
# The number of newlines after '}' or ';' of a struct/enum/union definition.
nl_after_struct = 0 # unsigned number
# The number of newlines before a class definition.
nl_before_class = 1 # unsigned number
nl_before_class = 0 # unsigned number
# The number of newlines after '}' or ';' of a class definition.
nl_after_class = 0 # unsigned number
@ -2625,11 +2564,6 @@ align_var_def_inline = false # true/false
# 0: Don't align (default).
align_assign_span = 1 # unsigned number
# The span for aligning on '{' in braced init list.
#
# 0: Don't align (default).
align_braced_init_list_span = 0 # unsigned number
# The span for aligning on '=' in function prototype modifier.
#
# 0: Don't align (default).
@ -2641,17 +2575,6 @@ align_assign_func_proto_span = 1 # unsigned number
# 0: No limit (default).
align_assign_thresh = 0 # number
# Whether to align on the left most assignment when multiple
# definitions are found on the same line.
# Depends on 'align_assign_span' and 'align_assign_thresh' settings.
align_assign_on_multi_var_defs = true # true/false
# The threshold for aligning on '{' in braced init list.
# Use a negative number for absolute thresholds.
#
# 0: No limit (default).
align_braced_init_list_thresh = 0 # number
# How to apply align_assign_span to function declaration "assignments", i.e.
# 'virtual void foo() = 0' or '~foo() = {default|delete}'.
#
@ -2857,7 +2780,7 @@ align_oc_decl_colon = false # true/false
# (OC) Whether to not align parameters in an Objectve-C message call if first
# colon is not on next line of the message call (the same way Xcode does
# alignment)
# aligment)
align_oc_msg_colon_xcode_like = false # true/false
#
@ -2917,7 +2840,7 @@ cmt_convert_tab_to_spaces = false # true/false
# keyword substitution and leading chars.
#
# Default: true
cmt_indent_multi = false # true/false
cmt_indent_multi = true # true/false
# Whether to align doxygen javadoc-style tags ('@param', '@return', etc.)
# and corresponding fields such that groups of consecutive block tags,
@ -2925,7 +2848,7 @@ cmt_indent_multi = false # true/false
# which is specified by the cmt_sp_after_star_cont. If cmt_width > 0, it may
# be necessary to enable cmt_indent_multi and set cmt_reflow_mode = 2
# in order to achieve the desired alignment for line-wrapping.
cmt_align_doxygen_javadoc_tags = true # true/false
cmt_align_doxygen_javadoc_tags = false # true/false
# The number of spaces to insert after the star and before doxygen
# javadoc-style tags (@param, @return, etc). Requires enabling
@ -2936,7 +2859,7 @@ cmt_align_doxygen_javadoc_tags = true # true/false
cmt_sp_before_doxygen_javadoc_tags = 1 # unsigned number
# Whether to change trailing, single-line c-comments into cpp-comments.
cmt_trailing_single_line_c_to_cpp = true # true/false
cmt_trailing_single_line_c_to_cpp = true # true/false
# Whether to group c-comments that look like they are in a block.
cmt_c_group = false # true/false
@ -2967,10 +2890,10 @@ cmt_cpp_nl_start = false # true/false
cmt_cpp_nl_end = false # true/false
# Whether to put a star on subsequent comment lines.
cmt_star_cont = false # true/false
cmt_star_cont = true # true/false
# The number of spaces to insert at the start of subsequent comment lines.
cmt_sp_before_star_cont = 1 # unsigned number
cmt_sp_before_star_cont = 0 # unsigned number
# The number of spaces to insert after the star on subsequent comment lines.
cmt_sp_after_star_cont = 1 # unsigned number
@ -3057,17 +2980,12 @@ mod_full_brace_function = ignore # ignore/add/remove/force/not_defined
mod_full_brace_if = add # ignore/add/remove/force/not_defined
# Whether to enforce that all blocks of an 'if'/'else if'/'else' chain either
# have, or do not have, braces. Overrides mod_full_brace_if.
# have, or do not have, braces. If true, braces will be added if any block
# needs braces, and will only be removed if they can be removed from all
# blocks.
#
# 0: Don't override mod_full_brace_if
# 1: Add braces to all blocks if any block needs braces and remove braces if
# they can be removed from all blocks
# 2: Add braces to all blocks if any block already has braces, regardless of
# whether it needs them
# 3: Add braces to all blocks if any block needs braces and remove braces if
# they can be removed from all blocks, except if all blocks have braces
# despite none needing them
mod_full_brace_if_chain = 0 # unsigned number
# Overrides mod_full_brace_if.
mod_full_brace_if_chain = false # true/false
# Whether to add braces to all blocks of an 'if'/'else if'/'else' chain.
# If true, mod_full_brace_if_chain will only remove braces from an 'if' that
@ -3109,14 +3027,6 @@ mod_pawn_semicolon = false # true/false
# statement, as in 'if (a && b > c)' => 'if (a && (b > c))'.
mod_full_paren_if_bool = true # true/false
# Whether to fully parenthesize Boolean expressions after '='
# statement, as in 'x = a && b > c;' => 'x = (a && (b > c));'.
mod_full_paren_assign_bool = true # true/false
# Whether to fully parenthesize Boolean expressions after '='
# statement, as in 'return a && b > c;' => 'return (a && (b > c));'.
mod_full_paren_return_bool = true # true/false
# Whether to remove superfluous semicolons.
mod_remove_extra_semicolon = true # true/false
@ -3184,10 +3094,6 @@ mod_sort_incl_import_grouping_enabled = false # true/false
# the close brace, as in 'case X: { ... } break;' => 'case X: { ... break; }'.
mod_move_case_break = false # true/false
# Whether to move a 'return' that appears after a fully braced 'case' before
# the close brace, as in 'case X: { ... } return;' => 'case X: { ... return; }'.
mod_move_case_return = false # true/false
# Add or remove braces around a fully braced case statement. Will only remove
# braces if there are no variable declarations in the block.
mod_case_brace = ignore # ignore/add/remove/force/not_defined
@ -3238,10 +3144,6 @@ pp_indent = ignore # ignore/add/remove/force/not_defined
# indented from column 1.
pp_indent_at_level = true # true/false
# Whether to indent #if/#else/#endif at the parenthesis level if the brace
# level is 0. If false, these are indented from column 1.
pp_indent_at_level0 = false # true/false
# Specifies the number of columns to indent preprocessors per level
# at brace level 0 (file-level). If pp_indent_at_level=false, also specifies
# the number of columns to indent preprocessors per level
@ -3307,37 +3209,12 @@ pp_indent_func_def = true # true/false
# Default: true
pp_indent_extern = true # true/false
# How to indent braces directly inside #if, #else, and #endif.
# Requires pp_if_indent_code=true and only applies to the indent of the
# preprocesser that the braces are directly inside of.
# 0: No extra indent
# 1: Indent by one level
# -1: Preserve original indentation
# Whether to indent braces directly inside #if, #else, and #endif.
# Only applies to the indent of the preprocesser that the braces are directly
# inside of.
#
# Default: 1
pp_indent_brace = 1 # number
# Whether to print warning messages for unbalanced #if and #else blocks.
# This will print a message in the following cases:
# - if an #ifdef block ends on a different indent level than
# where it started from. Example:
#
# #ifdef TEST
# int i;
# {
# int j;
# #endif
#
# - an #elif/#else block ends on a different indent level than
# the corresponding #ifdef block. Example:
#
# #ifdef TEST
# int i;
# #else
# }
# int j;
# #endif
pp_warn_unbalanced_if = false # true/false
# Default: true
pp_indent_brace = true # true/false
#
# Sort includes options
@ -3376,16 +3253,17 @@ use_indent_func_call_param = true # true/false
#
# true: indent_continue will be used only once
# false: indent_continue will be used every time (default)
#
# Requires indent_ignore_first_continue=false.
use_indent_continue_only_once = false # true/false
# The indentation can be:
# - after the assignment, at the '[' character
# - at the begin of the lambda body
# The value might be used twice:
# - at the assignment
# - at the opening brace
#
# true: indentation will be after the assignment
# false: indentation will be at the begin of the lambda body (default)
# To prevent the double use of the indentation value, use this option with the
# value 'true'.
#
# true: indentation will be used only once
# false: indentation will be used every time (default)
indent_cpp_lambda_only_once = true # true/false
# Whether sp_after_angle takes precedence over sp_inside_fparen. This was the
@ -3489,5 +3367,5 @@ debug_truncate = 0 # unsigned number
# `macro-close END_MESSAGE_MAP`
#
#
# option(s) with 'not default' value: 214
# option(s) with 'not default' value: 193
#

View File

@ -1,14 +1,14 @@
# Минимальная версия CMake
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.3)
# Предпочтительно следовать стандартам принятым в указанном диапазоне версий
cmake_policy(VERSION 3.6..3.7)
cmake_policy(VERSION 3.0.2..3.7)
# Название и версия проекта и используемые языки программирования
project(myx-cmake-example-app VERSION 0.3.0 LANGUAGES C CXX)
project(myx-cmake-example-app VERSION 0.2.0 LANGUAGES C CXX)
###
# Рекомендуемые переменные для MyxCMake
# Обязательные переменные для MyxCMake
###
# Название организации
set(MYX_CMAKE_ORGANIZATION_NAME "Org." CACHE STRING "")
@ -22,7 +22,7 @@ set(MYX_CMAKE_AUTHOR_EMAIL "mail@johndoe.com" CACHE STRING "")
# Краткое описание проекта
set(MYX_CMAKE_DESCRIPTION "Пример проекта: программа" CACHE STRING "")
find_package(MyxCMake 0.7.1 REQUIRED)
find_package(MyxCMake 0.4.1 REQUIRED)
# Boost
set(Boost_USE_STATIC_LIBS ON)

View File

@ -1,18 +1,18 @@
# Название основной цели и имени программы в текущем каталоге
project(myx-cmake-example-app)
set(TRGT myx-cmake-example-app)
# Список файлов исходных текстов
set(CPP ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
set(TRGT_cpp ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
# Функция для создания цели, результатом которой будет сборка приложения
add_executable(${PROJECT_NAME} ${CPP})
myx_cmake_common_target_properties(${PROJECT_NAME})
add_executable(${TRGT} ${TRGT_cpp})
myx_cmake_common_target_properties(${TRGT})
# Добавление к пути поиска заголовочных файлов
target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE ${Boost_INCLUDE_DIRS})
# Вместо строки выше можно использовать вариант, который автоматически
# добавляет параметры поиска заголовочных файлов и компоновки библиотек
target_link_libraries(${PROJECT_NAME} Boost::headers)
target_include_directories(${TRGT} SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})
# Имя выходного файла для цели
set_target_properties(${TRGT} PROPERTIES OUTPUT_NAME ${TRGT})
# Правила для установки
install(TARGETS ${PROJECT_NAME} COMPONENT main RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS ${TRGT} COMPONENT main RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View File

@ -1,5 +1,5 @@
#include <myx_cmake_example_app/myx_cmake_git_info_p.hpp>
#include <myx_cmake_example_app/myx_cmake_private_config_p.hpp>
#include <myx_cmake_git_info_p.hpp>
#include <myx_cmake_private_config_p.hpp>
#include <iostream>
#include <boost/range/counting_range.hpp>
@ -7,13 +7,15 @@
int32_t nsum( int32_t i = 0 )
{
int32_t s = 0;
for ( auto r: boost::counting_range( 1, i ) ) s += r;
for ( auto r: boost::counting_range( 1, i ) )
{
s += r;
}
return( s );
}
int main( int argc, char* argv [[gnu::unused]][] )
int main( int argc, char* argv[] )
{
// Значение из myx_cmake_private_config.hpp
std::cout << "Build type: " << MYX_CMAKE_BUILD_TYPE << std::endl;
@ -21,7 +23,6 @@ int main( int argc, char* argv [[gnu::unused]][] )
std::cout << "Git revision: " << MYX_CMAKE_EXAMPLE_APP_GIT_REV << std::endl;
auto s = nsum( argc );
std::cout << s << std::endl;
return ( s );