1.99.99
This commit is contained in:
parent
bd8ed5e679
commit
900bfe307b
@ -41,7 +41,7 @@ include(${MYX_CMAKE_LIB_DIR}/AddLibrary.cmake)
|
|||||||
include(${MYX_CMAKE_LIB_DIR}/TargetSetup.cmake)
|
include(${MYX_CMAKE_LIB_DIR}/TargetSetup.cmake)
|
||||||
include(${MYX_CMAKE_LIB_DIR}/Qt5TargetSetup.cmake)
|
include(${MYX_CMAKE_LIB_DIR}/Qt5TargetSetup.cmake)
|
||||||
|
|
||||||
include(${MYX_CMAKE_LIB_DIR}/Uncrustify.cmake)
|
include(${MYX_CMAKE_LIB_DIR}/uncrustify/Uncrustify.cmake)
|
||||||
include(${MYX_CMAKE_LIB_DIR}/doc/Doxygen.cmake)
|
include(${MYX_CMAKE_LIB_DIR}/doc/Doxygen.cmake)
|
||||||
|
|
||||||
include(${MYX_CMAKE_LIB_DIR}/generators/PrivateConfigHeader.cmake)
|
include(${MYX_CMAKE_LIB_DIR}/generators/PrivateConfigHeader.cmake)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
set(MYX_CMAKE_PACKAGE_VERSION "1.99.98")
|
set(MYX_CMAKE_PACKAGE_VERSION "1.99.99")
|
||||||
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()
|
||||||
|
@ -1,47 +1,19 @@
|
|||||||
include_guard(GLOBAL)
|
include_guard(GLOBAL)
|
||||||
|
|
||||||
|
if(${CMAKE_VERSION} VERSION_LESS "3.17.0")
|
||||||
|
set(MYX_CMAKE_LIB_UNCRUSTIFY_DIR_BACKPORT "${CMAKE_CURRENT_LIST_DIR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
find_program(UNCRUSTIFY_EXE NAMES uncrustify)
|
find_program(UNCRUSTIFY_EXE NAMES uncrustify)
|
||||||
|
|
||||||
if(UNCRUSTIFY_EXE)
|
|
||||||
if(NOT EXISTS ${PROJECT_BINARY_DIR}/uncrustify-classheader.txt)
|
|
||||||
file(GENERATE OUTPUT ${PROJECT_BINARY_DIR}/uncrustify-classheader.txt CONTENT
|
|
||||||
"/**
|
|
||||||
* @class $(fclass)
|
|
||||||
* @brief TODO
|
|
||||||
* @details TODO
|
|
||||||
*/")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT EXISTS ${PROJECT_BINARY_DIR}/uncrustify-filefooter.txt)
|
|
||||||
file(GENERATE OUTPUT ${PROJECT_BINARY_DIR}/uncrustify-filefooter.txt CONTENT
|
|
||||||
"// EOF $(filename)")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT EXISTS ${PROJECT_BINARY_DIR}/uncrustify-fileheader.txt)
|
|
||||||
file(GENERATE OUTPUT ${PROJECT_BINARY_DIR}/uncrustify-fileheader.txt CONTENT
|
|
||||||
"/**
|
|
||||||
* @file $(filename)
|
|
||||||
* @brief TODO
|
|
||||||
* @details TODO
|
|
||||||
*/")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT EXISTS ${PROJECT_BINARY_DIR}/uncrustify-funcheader.txt)
|
|
||||||
file(GENERATE OUTPUT ${PROJECT_BINARY_DIR}/uncrustify-funcheader.txt CONTENT
|
|
||||||
"/**
|
|
||||||
* @fn $(fclass)::$(function)
|
|
||||||
* $(javaparam)
|
|
||||||
* @details TODO
|
|
||||||
*/")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
function(myx_uncrustify target)
|
function(myx_uncrustify target)
|
||||||
|
if(${CMAKE_VERSION} VERSION_LESS "3.17.0")
|
||||||
|
set(CMAKE_CURRENT_FUNCTION_LIST_DIR ${MYX_CMAKE_LIB_UNCRUSTIFY_DIR_BACKPORT})
|
||||||
|
endif()
|
||||||
|
|
||||||
set(options)
|
set(options)
|
||||||
set(oneValueArgs CONFIG)
|
set(oneValueArgs CONFIG)
|
||||||
set(multiValueArgs)
|
set(multiValueArgs)
|
||||||
|
|
||||||
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
if(NOT ARG_CONFIG)
|
if(NOT ARG_CONFIG)
|
||||||
@ -61,6 +33,8 @@ function(myx_uncrustify target)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(NOT TARGET myx-uncrustify)
|
if(NOT TARGET myx-uncrustify)
|
||||||
add_custom_target(myx-uncrustify)
|
add_custom_target(myx-uncrustify)
|
||||||
endif()
|
endif()
|
||||||
@ -97,10 +71,10 @@ function(myx_uncrustify target)
|
|||||||
add_custom_target(${target}-uncrustify-append-comments
|
add_custom_target(${target}-uncrustify-append-comments
|
||||||
DEPENDS ${PROJECT_BINARY_DIR}/uncrustify-${target}.cfg
|
DEPENDS ${PROJECT_BINARY_DIR}/uncrustify-${target}.cfg
|
||||||
COMMAND ${UNCRUSTIFY_EXE} ${UNCRUSTIFY_OPTS}
|
COMMAND ${UNCRUSTIFY_EXE} ${UNCRUSTIFY_OPTS}
|
||||||
--set cmt_insert_class_header=${PROJECT_BINARY_DIR}/uncrustify-classheader.txt
|
--set cmt_insert_class_header=${CMAKE_CURRENT_FUNCTION_LIST_DIR}/classheader.txt
|
||||||
--set cmt_insert_file_footer=${PROJECT_BINARY_DIR}/uncrustify-filefooter.txt
|
--set cmt_insert_file_footer=${CMAKE_CURRENT_FUNCTION_LIST_DIR}/filefooter.txt
|
||||||
--set cmt_insert_file_header=${PROJECT_BINARY_DIR}/uncrustify-fileheader.txt
|
--set cmt_insert_file_header=${CMAKE_CURRENT_FUNCTION_LIST_DIR}/fileheader.txt
|
||||||
--set cmt_insert_func_header=${PROJECT_BINARY_DIR}/uncrustify-funcheader.txt
|
--set cmt_insert_func_header=${CMAKE_CURRENT_FUNCTION_LIST_DIR}/funcheader.txt
|
||||||
--set cmt_insert_before_ctor_dtor=true --mtime ${src})
|
--set cmt_insert_before_ctor_dtor=true --mtime ${src})
|
||||||
# cmake-format: on
|
# cmake-format: on
|
||||||
|
|
5
MyxCMake/lib/uncrustify/classheader.txt
Normal file
5
MyxCMake/lib/uncrustify/classheader.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/**
|
||||||
|
* @class $(fclass)
|
||||||
|
* @brief TODO
|
||||||
|
* @details TODO
|
||||||
|
*/
|
1
MyxCMake/lib/uncrustify/filefooter.txt
Normal file
1
MyxCMake/lib/uncrustify/filefooter.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
// EOF $(filename)
|
6
MyxCMake/lib/uncrustify/fileheader.txt
Normal file
6
MyxCMake/lib/uncrustify/fileheader.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// -*- C++ -*-
|
||||||
|
/**
|
||||||
|
* @file $(filename)
|
||||||
|
* @brief TODO
|
||||||
|
* @details TODO
|
||||||
|
*/
|
5
MyxCMake/lib/uncrustify/funcheader.txt
Normal file
5
MyxCMake/lib/uncrustify/funcheader.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/**
|
||||||
|
* @fn $(fclass)::$(function)
|
||||||
|
* $(javaparam)
|
||||||
|
* @details TODO
|
||||||
|
*/
|
@ -3,7 +3,7 @@
|
|||||||
## Установка
|
## Установка
|
||||||
|
|
||||||
В корневом каталоге проекта создать каталог `cmake` и распаковать в него
|
В корневом каталоге проекта создать каталог `cmake` и распаковать в него
|
||||||
[архив](../../../releases/download/1.99.98/myx-cmake-local-1.99.98.tar.xz ).
|
[архив](../../../releases/download/1.99.99/myx-cmake-local-1.99.99.tar.xz ).
|
||||||
|
|
||||||
## Использование
|
## Использование
|
||||||
|
|
||||||
|
2
debian/CMakeLists.txt
vendored
2
debian/CMakeLists.txt
vendored
@ -1,5 +1,5 @@
|
|||||||
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
|
||||||
project(myx-cmake VERSION 1.99.98 LANGUAGES)
|
project(myx-cmake VERSION 1.99.99 LANGUAGES)
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
file(WRITE ${CMAKE_SOURCE_DIR}/MyxCMake/MyxCMakeConfigVersion.cmake
|
file(WRITE ${CMAKE_SOURCE_DIR}/MyxCMake/MyxCMakeConfigVersion.cmake
|
||||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
|||||||
myx-cmake (1.99.98) unstable; urgency=medium
|
myx-cmake (1.99.99) unstable; urgency=medium
|
||||||
|
|
||||||
* New version.
|
* New version.
|
||||||
|
|
||||||
|
@ -20,11 +20,11 @@ if(MYX_CMAKE_DIR)
|
|||||||
set(ENV{MYX_CMAKE_DIR} ${MYX_CMAKE_DIR})
|
set(ENV{MYX_CMAKE_DIR} ${MYX_CMAKE_DIR})
|
||||||
endif()
|
endif()
|
||||||
if(DEFINED ENV{MYX_CMAKE_DIR})
|
if(DEFINED ENV{MYX_CMAKE_DIR})
|
||||||
find_package(MyxCMake 1.99.98 REQUIRED CONFIG PATHS $ENV{MYX_CMAKE_DIR} NO_DEFAULT_PATH)
|
find_package(MyxCMake 1.99.99 REQUIRED CONFIG PATHS $ENV{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 1.99.98 REQUIRED)
|
find_package(MyxCMake 1.99.99 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)
|
||||||
|
Loading…
Reference in New Issue
Block a user