Skip to content

Commit

Permalink
Update Hunter's files to v0.25.3 plus patches at 2024.01.18 (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
xDimon authored Jan 19, 2024
1 parent 405c1e9 commit 19ff1c9
Show file tree
Hide file tree
Showing 820 changed files with 5,110 additions and 2,368 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ _Base
CMakeSettings.json

# Default vscode python virtual env folder
env
env

# Maintenance output
maintenance/checked.txt
62 changes: 0 additions & 62 deletions .travis.yml

This file was deleted.

12 changes: 2 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Hunter
======

|gitter| |rtfd| |travis| |appveyor| |license|
|gitter| |rtfd| |license|

CMake driven cross-platform package manager for C/C++.
Linux, Windows, macOS, iOS, Android, Raspberry Pi, etc.
Expand All @@ -13,7 +13,7 @@ Linux, Windows, macOS, iOS, Android, Raspberry Pi, etc.
* Reporting issues: https://github.com/cpp-pm/hunter/issues/new
* Contributing guide: https://hunter.readthedocs.io/en/latest/contributing.html
* Contacts: https://hunter.readthedocs.io/en/latest/contacts.html
* `Per package testing table <https://github.com/cpp-pm/hunter-testing/branches/all>`_
* `Per package testing table <https://cpp-pm.github.io/hunter/>`_

.. |gitter| image:: https://badges.gitter.im/cpp-pm/community.svg
:target: https://gitter.im/cpp-pm/community
Expand All @@ -23,14 +23,6 @@ Linux, Windows, macOS, iOS, Android, Raspberry Pi, etc.
:target: http://hunter.readthedocs.io/en/latest/?badge=latest
:alt: Documentation status

.. |travis| image:: https://img.shields.io/travis/cpp-pm/hunter-testing/pkg.gtest.svg?style=flat&logo=travis&label=Linux%20OSX%20Android%20iOS
:target: https://travis-ci.com/cpp-pm/hunter-testing/builds
:alt: Travis CI

.. |appveyor| image:: https://img.shields.io/appveyor/ci/rbsheth/hunter-testing/pkg.gtest.svg?style=flat&logo=appveyor&label=Windows
:target: https://ci.appveyor.com/project/rbsheth/hunter-testing/history
:alt: AppVeyor CI

.. |license| image:: https://img.shields.io/github/license/cpp-pm/hunter.svg
:target: https://github.com/cpp-pm/hunter/blob/master/LICENSE
:alt: LICENSE
87 changes: 53 additions & 34 deletions cmake/find/FindOpenSSL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -305,42 +305,61 @@ if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")

string(COMPARE EQUAL "${openssl_version_str}" "" _is_empty)
if(_is_empty)
message(
FATAL_ERROR
"Incorrect OPENSSL_VERSION_NUMBER define in header"
": ${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
)
if(NOT _is_empty)
# Version parsing pre 3.x i.e 1.1.1 etc.
# The version number is encoded as 0xMNNFFPPS: major minor fix patch status
# The status gives if this is a developer or prerelease and is ignored here.
# Major, minor, and fix directly translate into the version numbers shown in
# the string. The patch field translates to the single character suffix that
# indicates the bug fix state, which 00 -> nothing, 01 -> a, 02 -> b and so
# on.

string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F]).*$"
"\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}")
list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR)
list(GET OPENSSL_VERSION_LIST 1 OPENSSL_VERSION_MINOR)
from_hex("${OPENSSL_VERSION_MINOR}" OPENSSL_VERSION_MINOR)
list(GET OPENSSL_VERSION_LIST 2 OPENSSL_VERSION_FIX)
from_hex("${OPENSSL_VERSION_FIX}" OPENSSL_VERSION_FIX)
list(GET OPENSSL_VERSION_LIST 3 OPENSSL_VERSION_PATCH)

if (NOT OPENSSL_VERSION_PATCH STREQUAL "00")
from_hex("${OPENSSL_VERSION_PATCH}" _tmp)
# 96 is the ASCII code of 'a' minus 1
math(EXPR OPENSSL_VERSION_PATCH_ASCII "${_tmp} + 96")
unset(_tmp)
# Once anyone knows how OpenSSL would call the patch versions beyond 'z'
# this should be updated to handle that, too. This has not happened yet
# so it is simply ignored here for now.
string(ASCII "${OPENSSL_VERSION_PATCH_ASCII}" OPENSSL_VERSION_PATCH_STRING)
endif ()

set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH_STRING}")
else()
# Version parsing post 3.x
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" OPENSSL_VERSION_MAJOR
REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_MAJOR[\t ]+[0-9a-fA-F]+.*")
string(REGEX REPLACE "^.*OPENSSL_VERSION_MAJOR[\t ]+([0-9a-fA-F]+).*$" "\\1" OPENSSL_VERSION_MAJOR "${OPENSSL_VERSION_MAJOR}")
string(COMPARE EQUAL "${OPENSSL_VERSION_MAJOR}" "" _major_is_empty)
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" OPENSSL_VERSION_MINOR
REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_MINOR[\t ]+[0-9a-fA-F]+.*")
string(REGEX REPLACE "^.*OPENSSL_VERSION_MINOR[\t ]+([0-9a-fA-F]+).*$" "\\1" OPENSSL_VERSION_MINOR "${OPENSSL_VERSION_MINOR}")
string(COMPARE EQUAL "${OPENSSL_VERSION_MINOR}" "" _minor_is_empty)
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" OPENSSL_VERSION_PATCH
REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_PATCH[\t ]+[0-9a-fA-F]+.*")
string(REGEX REPLACE "^.*OPENSSL_VERSION_PATCH[\t ]+([0-9a-fA-F]+).*$" "\\1" OPENSSL_VERSION_PATCH "${OPENSSL_VERSION_PATCH}")
string(COMPARE EQUAL "${OPENSSL_VERSION_PATCH}" "" _patch_is_empty)

if(_major_is_empty OR _minor_is_empty OR _patch_is_empty)
message(
FATAL_ERROR
"Incorrect OPENSSL_VERSION_NUMBER define in header"
": ${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
)
endif()
set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_PATCH}")
endif()

# The version number is encoded as 0xMNNFFPPS: major minor fix patch status
# The status gives if this is a developer or prerelease and is ignored here.
# Major, minor, and fix directly translate into the version numbers shown in
# the string. The patch field translates to the single character suffix that
# indicates the bug fix state, which 00 -> nothing, 01 -> a, 02 -> b and so
# on.

string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F]).*$"
"\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}")
list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR)
list(GET OPENSSL_VERSION_LIST 1 OPENSSL_VERSION_MINOR)
from_hex("${OPENSSL_VERSION_MINOR}" OPENSSL_VERSION_MINOR)
list(GET OPENSSL_VERSION_LIST 2 OPENSSL_VERSION_FIX)
from_hex("${OPENSSL_VERSION_FIX}" OPENSSL_VERSION_FIX)
list(GET OPENSSL_VERSION_LIST 3 OPENSSL_VERSION_PATCH)

if (NOT OPENSSL_VERSION_PATCH STREQUAL "00")
from_hex("${OPENSSL_VERSION_PATCH}" _tmp)
# 96 is the ASCII code of 'a' minus 1
math(EXPR OPENSSL_VERSION_PATCH_ASCII "${_tmp} + 96")
unset(_tmp)
# Once anyone knows how OpenSSL would call the patch versions beyond 'z'
# this should be updated to handle that, too. This has not happened yet
# so it is simply ignored here for now.
string(ASCII "${OPENSSL_VERSION_PATCH_ASCII}" OPENSSL_VERSION_PATCH_STRING)
endif ()

set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH_STRING}")
endif ()

include(FindPackageHandleStandardArgs)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/hunter_autotools_project.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ function(hunter_autotools_project target_name)
set(optional_params)
set(one_value_params
HUNTER_SELF
URL
URL_HASH
DOWNLOAD_DIR
SOURCE_DIR
Expand All @@ -88,6 +87,7 @@ function(hunter_autotools_project target_name)
BOOTSTRAP
)
set(multi_value_params
URL
PACKAGE_CONFIGURATION_TYPES
EXTRA_FLAGS
PATCH_COMMAND
Expand Down
16 changes: 16 additions & 0 deletions cmake/modules/hunter_create_cache_file.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,22 @@ function(hunter_create_cache_file cache_path)
"set(CMAKE_POLICY_DEFAULT_CMP0069 NEW CACHE INTERNAL \"\")\n"
)

# CMP0114 should be set to NEW to squash CMake warnings at Xcode build time,
# without modifying source code
file(
APPEND
"${temp_path}"
"set(CMAKE_POLICY_DEFAULT_CMP0114 NEW CACHE INTERNAL \"\")\n"
)

# CMP0135 should be set to NEW to squash CMake warnings at build time,
# without modifying source code
file(
APPEND
"${temp_path}"
"set(CMAKE_POLICY_DEFAULT_CMP0135 NEW CACHE INTERNAL \"\")\n"
)

# Disable package registry {
### http://www.cmake.org/cmake/help/v3.1/manual/cmake-packages.7.html#disabling-the-package-registry
file(
Expand Down
32 changes: 18 additions & 14 deletions cmake/modules/hunter_dump_cmake_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,28 @@ include(hunter_assert_not_empty_string)
# * odb-boost
# * ncursesw
function(hunter_dump_cmake_flags)
cmake_parse_arguments(x "SKIP_INCLUDES;SKIP_PIC" "CPPFLAGS" "" "${ARGV}")
cmake_parse_arguments(x "SKIP_INCLUDES;SKIP_PIC;SKIP_DEPLOYMENT_TARGET" "CPPFLAGS" "" "${ARGV}")
# -> x_SKIP_INCLUDES
# -> x_SKIP_PIC
# -> x_SKIP_DEPLOYMENT_TARGET
# -> x_CPPFLAGS

string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed)
if(has_unparsed)
hunter_internal_error("Unparsed arguments: ${x_UNPARSED_ARGUMENTS}")
endif()


if(IOS)
hunter_assert_not_empty_string("${IOS_SDK_VERSION}")
string(COMPARE EQUAL "${IOS_DEPLOYMENT_SDK_VERSION}" "" _no_deployment_sdk_version)
if(_no_deployment_sdk_version)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -miphoneos-version-min=${IOS_SDK_VERSION}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -miphoneos-version-min=${IOS_SDK_VERSION}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}")
if(NOT x_SKIP_DEPLOYMENT_TARGET)
hunter_assert_not_empty_string("${IOS_SDK_VERSION}")
string(COMPARE EQUAL "${IOS_DEPLOYMENT_SDK_VERSION}" "" _no_deployment_sdk_version)
if(_no_deployment_sdk_version)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -miphoneos-version-min=${IOS_SDK_VERSION}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -miphoneos-version-min=${IOS_SDK_VERSION}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}")
endif()
endif()

if(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE)
Expand All @@ -55,10 +57,12 @@ function(hunter_dump_cmake_flags)
set(cppflags "-isysroot ${CMAKE_OSX_SYSROOT}")
endif()

if(NOT "${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
set(cppflags "${cppflags} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
if(NOT x_SKIP_DEPLOYMENT_TARGET)
if(NOT "${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
set(cppflags "${cppflags} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif()
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/hunter_finalize.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ macro(hunter_finalize)
string(COMPARE EQUAL "${HUNTER_CACHE_SERVERS}" "" _is_empty)
if(_is_empty)
hunter_status_debug("Using default cache server")
set(HUNTER_CACHE_SERVERS "https://github.com/ingenue/hunter-cache")
set(HUNTER_CACHE_SERVERS "https://github.com/cpp-pm/hunter-cache")
endif()

hunter_status_debug("List of cache servers:")
Expand Down
3 changes: 3 additions & 0 deletions cmake/modules/hunter_get_boost_libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,13 @@ function(hunter_get_boost_libs)
hunter_append_component(${common_args} COMPONENT graph SINCE 1.18.0)
hunter_append_component(${common_args} COMPONENT graph_parallel SINCE 1.18.0)
hunter_append_component(${common_args} COMPONENT iostreams SINCE 1.33.0)
hunter_append_component(${common_args} COMPONENT json SINCE 1.75.0)
hunter_append_component(${common_args} COMPONENT locale SINCE 1.48.0)
hunter_append_component(${common_args} COMPONENT log SINCE 1.54.0)
hunter_append_component(${common_args} COMPONENT math SINCE 1.23.0)
hunter_append_component(${common_args} COMPONENT metaparse SINCE 1.61.0 UNTIL 1.66.0)
hunter_append_component(${common_args} COMPONENT mpi SINCE 1.35.0)
hunter_append_component(${common_args} COMPONENT nowide SINCE 1.74.0)
hunter_append_component(${common_args} COMPONENT program_options SINCE 1.32.0)
hunter_append_component(${common_args} COMPONENT python SINCE 1.19.0)
hunter_append_component(${common_args} COMPONENT random SINCE 1.15.0)
Expand All @@ -82,6 +84,7 @@ function(hunter_get_boost_libs)
hunter_append_component(${common_args} COMPONENT thread SINCE 1.25.0)
hunter_append_component(${common_args} COMPONENT timer SINCE 1.9.0)
hunter_append_component(${common_args} COMPONENT type_erasure SINCE 1.60.0)
hunter_append_component(${common_args} COMPONENT url SINCE 1.81.0)
hunter_append_component(${common_args} COMPONENT wave SINCE 1.33.0)
# DOCUMENTATION_END }

Expand Down
37 changes: 28 additions & 9 deletions cmake/modules/hunter_pack_git_submodule.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,34 @@ function(hunter_pack_git_submodule)

set(top_git_directory "${output}")

set(cmd "${git_executable}" submodule status "${x_GIT_SUBMODULE}")
set(submodule_dir "${top_git_directory}/${x_GIT_SUBMODULE}")
if(NOT EXISTS "${submodule_dir}")
hunter_internal_error("Directory not exist: '${submodule_dir}'")
endif()

set(cmd "${git_executable}" rev-parse --show-toplevel)
execute_process(
COMMAND ${cmd}
WORKING_DIRECTORY "${top_git_directory}"
WORKING_DIRECTORY "${submodule_dir}/../"
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE error
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE
)

if(NOT result EQUAL "0")
hunter_internal_error(
"Command failed: ${cmd} (${result}, ${output}, ${error})"
)
endif()

set(parent_git_directory "${output}")

set(cmd "${git_executable}" submodule status "${submodule_dir}")
execute_process(
COMMAND ${cmd}
WORKING_DIRECTORY "${parent_git_directory}"
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE error
Expand All @@ -60,24 +84,19 @@ function(hunter_pack_git_submodule)
string(REPLACE ";" " " cmd "${cmd}")
hunter_internal_error(
"Command failed: '${cmd}' (${result}, ${output}, ${error})"
"To reproduce error go to '${top_git_directory}' and"
"To reproduce error go to '${parent_git_directory}' and"
"run command '${cmd}'"
)
endif()

set(submodule_file "${top_git_directory}/.gitmodules")
set(submodule_file "${parent_git_directory}/.gitmodules")
if(NOT EXISTS "${submodule_file}")
hunter_internal_error("File not found: '${submodule_file}'")
endif()
set_property(
DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${submodule_file}"
)

set(submodule_dir "${top_git_directory}/${x_GIT_SUBMODULE}")
if(NOT EXISTS "${submodule_dir}")
hunter_internal_error("Directory not exist: '${submodule_dir}'")
endif()

set(cmd "${git_executable}" status --porcelain)
execute_process(
COMMAND ${cmd}
Expand Down
Loading

0 comments on commit 19ff1c9

Please sign in to comment.