From 386faf578e833addd766bd817c3acb990b9febed Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Tue, 4 Oct 2022 06:59:45 +0300 Subject: [PATCH] 1.99.71 --- MyxCMakeConfigVersion.cmake | 2 +- README.md | 4 ++-- VERSION | 2 +- create_release.sh | 2 +- lib/AddLibrary.cmake | 2 ++ lib/DirectoriesGuards.cmake | 12 ++++++------ lib/FetchContentAdd.cmake | 21 +++++++++++++++++++++ 7 files changed, 34 insertions(+), 11 deletions(-) diff --git a/MyxCMakeConfigVersion.cmake b/MyxCMakeConfigVersion.cmake index 1293352..4f6e4a7 100644 --- a/MyxCMakeConfigVersion.cmake +++ b/MyxCMakeConfigVersion.cmake @@ -1,4 +1,4 @@ -set(MYX_CMAKE_PACKAGE_VERSION "1.99.70") +set(MYX_CMAKE_PACKAGE_VERSION "1.99.71") if(MYX_CMAKE_PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() diff --git a/README.md b/README.md index 19862ba..37316f0 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,10 @@ if(MYX_CMAKE_DIR) set(ENV{MYX_CMAKE_DIR} ${MYX_CMAKE_DIR}) endif() if(DEFINED ENV{MYX_CMAKE_DIR}) - find_package(MyxCMake 1.99.70 REQUIRED) + find_package(MyxCMake 1.99.71 REQUIRED) else() if(MYX_CMAKE_USE_SYSTEM) - find_package(MyxCMake 1.99.70 REQUIRED) + find_package(MyxCMake 1.99.71 REQUIRED) else() include(${PROJECT_SOURCE_DIR}/cmake/myx/MyxCMakeConfig.cmake) endif() diff --git a/VERSION b/VERSION index e13d10b..2008603 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.99.70 +1.99.71 diff --git a/create_release.sh b/create_release.sh index 71aefb1..6f8f326 100755 --- a/create_release.sh +++ b/create_release.sh @@ -30,4 +30,4 @@ git tag $V git push --tags git tag -d $V git push --all -tea r c -t $V --tag $V -a build/myx-cmake-$V.tar.xz +tea r c --repo cmake/myx -t $V --tag $V -a build/myx-cmake-$V.tar.xz diff --git a/lib/AddLibrary.cmake b/lib/AddLibrary.cmake index a7c6357..df0c197 100644 --- a/lib/AddLibrary.cmake +++ b/lib/AddLibrary.cmake @@ -19,6 +19,8 @@ myx_add_library include_guard(GLOBAL) +# Переменная `CMAKE_CURRENT_FUNCTION_LIST_DIR` позволяет определить +# каталог файла. if(${CMAKE_VERSION} VERSION_LESS "3.17.0") set(CMAKE_CURRENT_FUNCTION_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}) endif() diff --git a/lib/DirectoriesGuards.cmake b/lib/DirectoriesGuards.cmake index 459cfbe..ce679be 100644 --- a/lib/DirectoriesGuards.cmake +++ b/lib/DirectoriesGuards.cmake @@ -17,32 +17,32 @@ get_filename_component(project_binary_dir "${PROJECT_BINARY_DIR}" REALPATH) get_filename_component(cmake_install_prefix "${CMAKE_INSTALL_PREFIX}" REALPATH) if(cmake_install_prefix STREQUAL cmake_binary_dir) - myx_message_error( + myx_message_fatal_error( "Myx: Cannot install into build directory ${CMAKE_INSTALL_PREFIX}.") endif() if(cmake_install_prefix STREQUAL cmake_source_dir) - myx_message_error( + myx_message_fatal_error( "Myx: Cannot install into source directory ${CMAKE_INSTALL_PREFIX}.") endif() if(cmake_install_prefix STREQUAL project_binary_dir) - myx_message_error( + myx_message_fatal_error( "Myx: Cannot install into build directory ${CMAKE_INSTALL_PREFIX}.") endif() if(cmake_install_prefix STREQUAL project_source_dir) - myx_message_error( + myx_message_fatal_error( "Myx: Cannot install into source directory ${CMAKE_INSTALL_PREFIX}.") endif() if(cmake_binary_dir STREQUAL cmake_source_dir) - myx_message_error( + myx_message_fatal_error( "Myx: Cannot build in source directory ${CMAKE_SOURCE_DIR}") endif() if(project_binary_dir STREQUAL project_source_dir) - myx_message_error( + myx_message_fatal_error( "Myx: Cannot build in source directory ${CMAKE_SOURCE_DIR}") endif() diff --git a/lib/FetchContentAdd.cmake b/lib/FetchContentAdd.cmake index e94de22..1b40ac2 100644 --- a/lib/FetchContentAdd.cmake +++ b/lib/FetchContentAdd.cmake @@ -1,3 +1,24 @@ +#[=======================================================================[.rst: +FetchContent_Add +---------------- + +Вспомогательная функция для `FetchContent_Declare()`:: + + FetchContent_Add(NAME + [ GIT_REPOSITORY repo ] | + [ GIT_REMOTE remote ] | + [ GIT_PATH path ]) + +Обязательные параметры: `NAME` - идентификатор загружаемого ресурса. +Параметр `GIT_REPOSITORY` определяет имя репозитория по умолчанию. +Если указана пара параметров `GIT_REMOTE` и `GIT_PATH` и у git-репозитория +основного проекта указан удалённый репозиторий с именем, определяемым +переменной `GIT_REMOTE`, то адрес репозитория для получения проекта +изменяется. В этом случае загрузка будет производиться с сервера, +определяемого из адреса с меткой `GIT_REMOTE`, и по пути `GIT_PATH`. + +#]=======================================================================] + include_guard(GLOBAL) # Обязательно в глобальной области