myx update

This commit is contained in:
Andrei Astafev 2022-10-21 10:54:10 +03:00
parent 3650f5de98
commit 0b5e031bd7
6 changed files with 45 additions and 43 deletions

View File

@ -1570,7 +1570,7 @@ donot_indent_func_def_close_paren = false # true/false
nl_collapse_empty_body = false # true/false nl_collapse_empty_body = false # true/false
# Don't split one-line braced assignments, as in 'foo_t f = { 1, 2 };'. # Don't split one-line braced assignments, as in 'foo_t f = { 1, 2 };'.
nl_assign_leave_one_liners = true # true/false nl_assign_leave_one_liners = false # true/false
# Don't split one-line braced statements inside a 'class xx { }' body. # Don't split one-line braced statements inside a 'class xx { }' body.
nl_class_leave_one_liners = true # true/false nl_class_leave_one_liners = true # true/false
@ -1656,7 +1656,7 @@ nl_after_square_assign = ignore # ignore/add/remove/force/not_defined
# Add or remove newline between a function call's ')' and '{', as in # Add or remove newline between a function call's ')' and '{', as in
# 'list_for_each(item, &list) { }'. # 'list_for_each(item, &list) { }'.
nl_fcall_brace = add # ignore/add/remove/force/not_defined nl_fcall_brace = force # ignore/add/remove/force/not_defined
# Add or remove newline between 'enum' and '{'. # Add or remove newline between 'enum' and '{'.
nl_enum_brace = force # ignore/add/remove/force/not_defined nl_enum_brace = force # ignore/add/remove/force/not_defined
@ -1680,17 +1680,17 @@ nl_struct_brace = force # ignore/add/remove/force/not_defined
nl_union_brace = force # ignore/add/remove/force/not_defined nl_union_brace = force # ignore/add/remove/force/not_defined
# Add or remove newline between 'if' and '{'. # Add or remove newline between 'if' and '{'.
nl_if_brace = force # ignore/add/remove/force/not_defined nl_if_brace = remove # ignore/add/remove/force/not_defined
# Add or remove newline between '}' and 'else'. # Add or remove newline between '}' and 'else'.
nl_brace_else = force # ignore/add/remove/force/not_defined nl_brace_else = remove # ignore/add/remove/force/not_defined
# Add or remove newline between 'else if' and '{'. If set to ignore, # Add or remove newline between 'else if' and '{'. If set to ignore,
# nl_if_brace is used instead. # nl_if_brace is used instead.
nl_elseif_brace = force # ignore/add/remove/force/not_defined nl_elseif_brace = force # ignore/add/remove/force/not_defined
# Add or remove newline between 'else' and '{'. # Add or remove newline between 'else' and '{'.
nl_else_brace = force # ignore/add/remove/force/not_defined nl_else_brace = remove # ignore/add/remove/force/not_defined
# Add or remove newline between 'else' and 'if'. # Add or remove newline between 'else' and 'if'.
nl_else_if = force # ignore/add/remove/force/not_defined nl_else_if = force # ignore/add/remove/force/not_defined
@ -1714,7 +1714,7 @@ nl_try_brace = ignore # ignore/add/remove/force/not_defined
nl_getset_brace = ignore # ignore/add/remove/force/not_defined nl_getset_brace = ignore # ignore/add/remove/force/not_defined
# Add or remove newline between 'for' and '{'. # Add or remove newline between 'for' and '{'.
nl_for_brace = add # ignore/add/remove/force/not_defined nl_for_brace = remove # ignore/add/remove/force/not_defined
# Add or remove newline before the '{' of a 'catch' statement, as in # Add or remove newline before the '{' of a 'catch' statement, as in
# 'catch (decl) <here> {'. # 'catch (decl) <here> {'.
@ -1738,7 +1738,7 @@ nl_brace_square = ignore # ignore/add/remove/force/not_defined
nl_brace_fparen = ignore # ignore/add/remove/force/not_defined nl_brace_fparen = ignore # ignore/add/remove/force/not_defined
# Add or remove newline between 'while' and '{'. # Add or remove newline between 'while' and '{'.
nl_while_brace = add # ignore/add/remove/force/not_defined nl_while_brace = remove # ignore/add/remove/force/not_defined
# (D) Add or remove newline between 'scope (x)' and '{'. # (D) Add or remove newline between 'scope (x)' and '{'.
nl_scope_brace = ignore # ignore/add/remove/force/not_defined nl_scope_brace = ignore # ignore/add/remove/force/not_defined
@ -1763,7 +1763,7 @@ nl_do_brace = ignore # ignore/add/remove/force/not_defined
nl_brace_while = ignore # ignore/add/remove/force/not_defined nl_brace_while = ignore # ignore/add/remove/force/not_defined
# Add or remove newline between 'switch' and '{'. # Add or remove newline between 'switch' and '{'.
nl_switch_brace = add # ignore/add/remove/force/not_defined nl_switch_brace = remove # ignore/add/remove/force/not_defined
# Add or remove newline between 'synchronized' and '{'. # Add or remove newline between 'synchronized' and '{'.
nl_synchronized_brace = ignore # ignore/add/remove/force/not_defined nl_synchronized_brace = ignore # ignore/add/remove/force/not_defined
@ -1862,7 +1862,7 @@ nl_template_var = ignore # ignore/add/remove/force/not_defined
nl_template_using = ignore # ignore/add/remove/force/not_defined nl_template_using = ignore # ignore/add/remove/force/not_defined
# Add or remove newline between 'class' and '{'. # Add or remove newline between 'class' and '{'.
nl_class_brace = add # ignore/add/remove/force/not_defined nl_class_brace = force # ignore/add/remove/force/not_defined
# Add or remove newline before or after (depending on pos_class_comma, # Add or remove newline before or after (depending on pos_class_comma,
# may not be IGNORE) each',' in the base class list. # may not be IGNORE) each',' in the base class list.
@ -2283,7 +2283,7 @@ nl_after_func_body_one_liner = 0 # unsigned number
# of a function body. # of a function body.
# #
# 0: No change (default). # 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 # The number of newlines before a block of typedefs. If nl_after_access_spec
# is non-zero, that option takes precedence. # is non-zero, that option takes precedence.
@ -2294,7 +2294,7 @@ nl_typedef_blk_start = 0 # unsigned number
# The number of newlines after a block of typedefs. # The number of newlines after a block of typedefs.
# #
# 0: No change (default). # 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. # The maximum number of consecutive newlines within a block of typedefs.
# #
@ -2306,7 +2306,7 @@ nl_typedef_blk_in = 0 # unsigned number
# that option takes precedence. # that option takes precedence.
# #
# 0: No change (default). # 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 # The number of empty newlines after a block of variable definitions
# not at the top of a function body. # not at the top of a function body.

View File

@ -5,35 +5,52 @@ cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
cmake_policy(VERSION 3.6..3.7) cmake_policy(VERSION 3.6..3.7)
# Название и версия проекта и используемые языки программирования # Название и версия проекта и используемые языки программирования
project(myx-example-qt5-console VERSION 0.4.0 LANGUAGES C CXX) project(znk-results VERSION 0.4.0 LANGUAGES C CXX)
# Рекомендуемый способ подключения MyxCMake # Рекомендуемый способ подключения MyxCMake
include(cmake/myx_setup.cmake) include(cmake/myx_setup.cmake)
# Поиск пакетов # Поиск пакетов
myx_find_required_packages( myx_find_required_packages(
Qt5 Core PACKAGES Eigen3
Qt5 Core Sql
Qt5Private Core) Qt5Private Core)
FetchContent_Add(myx-handy-paths
GIT_REPOSITORY git@gitlab.2:myx/libs/myx-handy-paths
GIT_PATH myx/libs/myx-handy-paths
GIT_REMOTE origin
)
FetchContent_Add(myx-handy-yaml
GIT_REPOSITORY git@gitlab.2:myx/libs/myx-handy-yaml
GIT_PATH myx/libs/myx-handy-yaml
GIT_REMOTE origin
)
FetchContent_Add(myx-qt-database
GIT_REPOSITORY git@gitlab.2:myx/libs/myx-qt-database
GIT_PATH myx/libs/myx-qt-database
GIT_REMOTE origin
)
# Цель для создания исполняемого файла # Цель для создания исполняемого файла
myx_add_executable(${PROJECT_NAME}) myx_add_executable(${PROJECT_NAME})
# Настройка свойств цели # Настройка свойств цели
myx_target_setup(${PROJECT_NAME} myx_target_setup(${PROJECT_NAME}
PACKAGES Eigen3
CPP CPP
${PROJECT_SOURCE_DIR}/src/${PROJECT_NAME}/main.cpp ${PROJECT_SOURCE_DIR}/src/${PROJECT_NAME}/main.cpp
LINK_LIBRARIES myx-handy-paths myx-qt-database Eigen3::Eigen
) )
# Настройка Qt для цели # Настройка Qt для цели
myx_qt5_target_setup(${PROJECT_NAME} myx_qt5_target_setup(${PROJECT_NAME}
COMPONENTS Core COMPONENTS Core Sql
PRIVATE Core) PRIVATE Core
)
# Автоматически генерируемый файл с информацией о репозитории
myx_generate_git_info_header(${PROJECT_NAME} "git_info_p.hpp")
# Автоматически генерируемый приватный заголовочный файл
myx_generate_private_config_header(${PROJECT_NAME} "config_p.hpp")
# Форматирование исходных текстов с помощью uncrustify # Форматирование исходных текстов с помощью uncrustify
myx_uncrustify(${PROJECT_NAME}) myx_uncrustify(${PROJECT_NAME})

View File

@ -1,4 +1,4 @@
set(MYX_CMAKE_PACKAGE_VERSION "2.0.32") set(MYX_CMAKE_PACKAGE_VERSION "2.0.33")
if(MYX_CMAKE_PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) if(MYX_CMAKE_PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE) set(PACKAGE_VERSION_COMPATIBLE FALSE)
else() else()

View File

@ -47,7 +47,7 @@ function(myx_uncrustify TARGET_NAME)
# Динамически сгенерированные файлы исключаются # Динамически сгенерированные файлы исключаются
get_target_property(__target_type ${TARGET_NAME} TYPE) get_target_property(__target_type ${TARGET_NAME} TYPE)
if((${__target_type} STREQUAL "INTERFACE_LIBRARY") AND (${CMAKE_VERSION} VERSION_LESS "3.15.0")) if((${__target_type} STREQUAL "INTERFACE_LIBRARY") AND (${CMAKE_VERSION} VERSION_LESS "3.17.0"))
get_target_property(__s1 ${TARGET_NAME} INTERFACE_SOURCES) get_target_property(__s1 ${TARGET_NAME} INTERFACE_SOURCES)
if(__s1) if(__s1)
list(APPEND __all_sources ${__s1}) list(APPEND __all_sources ${__s1})
@ -68,7 +68,8 @@ function(myx_uncrustify TARGET_NAME)
set(__fixed_config ${PROJECT_BINARY_DIR}/uncrustify-${TARGET_NAME}.cfg) set(__fixed_config ${PROJECT_BINARY_DIR}/uncrustify-${TARGET_NAME}.cfg)
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/uncrustify-${TARGET_NAME}.cfg add_custom_command(OUTPUT ${__fixed_config}
DEPENDS ${ARG_CONFIG}
COMMAND ${UNCRUSTIFY_EXE} --update-config-with-doc COMMAND ${UNCRUSTIFY_EXE} --update-config-with-doc
-c ${ARG_CONFIG} -o ${__fixed_config}) -c ${ARG_CONFIG} -o ${__fixed_config})
list(APPEND __options -c ${__fixed_config}) list(APPEND __options -c ${__fixed_config})

View File

@ -20,11 +20,11 @@ if(ENV{MYX_CMAKE_DIR})
set(MYX_CMAKE_DIR $ENV{MYX_CMAKE_DIR}) set(MYX_CMAKE_DIR $ENV{MYX_CMAKE_DIR})
endif() endif()
if(MYX_CMAKE_DIR) if(MYX_CMAKE_DIR)
find_package(MyxCMake 2.0.32 REQUIRED CONFIG PATHS ${MYX_CMAKE_DIR} NO_DEFAULT_PATH) find_package(MyxCMake 2.0.33 REQUIRED CONFIG PATHS ${MYX_CMAKE_DIR} NO_DEFAULT_PATH)
myx_message_notice("=== MyxCMake directory: ${MyxCMake_CONFIG} ===") myx_message_notice("=== MyxCMake directory: ${MyxCMake_CONFIG} ===")
else() else()
if(MYX_CMAKE_USE_SYSTEM) if(MYX_CMAKE_USE_SYSTEM)
find_package(MyxCMake 2.0.32 REQUIRED) find_package(MyxCMake 2.0.33 REQUIRED)
myx_message_notice("=== MyxCMake directory: ${MyxCMake_CONFIG} ===") myx_message_notice("=== MyxCMake directory: ${MyxCMake_CONFIG} ===")
else() else()
include(${PROJECT_SOURCE_DIR}/cmake/myx/MyxCMakeConfig.cmake) include(${PROJECT_SOURCE_DIR}/cmake/myx/MyxCMakeConfig.cmake)

View File

@ -1,16 +0,0 @@
#include "config_p.hpp"
#include "git_info_p.hpp"
#include <QCoreApplication>
#include <QDebug>
#include <QtCore/private/minimum-linux_p.h>
int main( int argc, char** argv )
{
QCoreApplication app( argc, argv );
qDebug() << "Qt5";
qDebug() << "Min Linux: " << MINLINUX_MAJOR << "." << MINLINUX_MINOR << "." << MINLINUX_PATCH;
return( 0 );
}