Merge remote-tracking branch 'origin/master' into warning

This commit is contained in:
Billy Robert O'Neal III 2020-03-12 14:40:01 -07:00
Родитель 52214665b2 c2795f1662
Коммит 5c36b48154
20 изменённых файлов: 201 добавлений и 131 удалений

Просмотреть файл

@ -1,4 +1,5 @@
Source: cli
Version: 1.1.1
Homepage: https://github.com/daniele77/cli
Description: A library for interactive command line interfaces in modern C++
Build-Depends: boost-asio

Просмотреть файл

@ -1,4 +1,5 @@
Source: cppgraphqlgen
Version: 3.0.4
Version: 3.1.1
Build-Depends: boost-filesystem (!uwp&!windows), boost-program-options, pegtl, rapidjson
Description: C++ GraphQL schema service generator
Homepage: https://github.com/microsoft/cppgraphqlgen

Просмотреть файл

@ -1,10 +1,8 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO microsoft/cppgraphqlgen
REF a70d822b5fa205e29c752fb0f8cc13bb010a47ea # v3.0.4
SHA512 80111ba78382b833a67e8fe4d0db0023e7d16e21d8abb21f06a9248918ee1010f9cfd5433f1c82122a7d59d53a2dab88ef699d1a13054c6d3455370622e3d71c
REF v3.1.1
SHA512 c6ebffcfd6f563b2a4ba1822ca173c73fd41b6f1dfbd4f94e64bee4bff626c64d88b2a35fa4c38189ba16852945f53d1f60dd68dc0ea85eb036ec31c94e7bdf4
HEAD_REF master
)
@ -25,5 +23,3 @@ vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/cppgraphqlgen)
vcpkg_copy_pdbs()
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/cppgraphqlgen/copyright COPYONLY)
vcpkg_test_cmake(PACKAGE_NAME cppgraphqlgen)

Просмотреть файл

@ -16,7 +16,7 @@ index 63351523..c078de3f 100644
+# endif
+# undef NOMINMAX
+# define NOMINMAX
+# include <Windows.h> // For: MultiByteToWideChar
+# include <windows.h> // For: MultiByteToWideChar
+# include <io.h>
+# include <wchar.h>
+

Просмотреть файл

@ -1,5 +1,5 @@
Source: gettext
Version: 0.19-14
Version: 0.19-15
Homepage: https://www.gnu.org/software/gettext/
Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. Provides libintl.
Build-Depends: libiconv

Просмотреть файл

@ -275,7 +275,9 @@
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mempcpy' function. */
/* #undef HAVE_MEMPCPY */
#ifdef __GNUC__
#define HAVE_MEMPCPY 1
#endif
/* Define to 1 if you have a working `mmap' system call. */
/* #undef HAVE_MMAP */

Просмотреть файл

@ -1,6 +1,14 @@
Source: libgit2
Version: 0.99.0
Version: 0.99.0-1
Homepage: https://github.com/libgit2/libgit2
Build-Depends: openssl (!windows&&!uwp)
Build-Depends: zlib, openssl (!windows&&!uwp)
Description: Git linkable library
Supports: !uwp
Feature: pcre
Description: Build against external libpcre
Build-Depends: pcre
Feature: pcre2
Description: Build against external libpcre2
Build-Depends: pcre2

Просмотреть файл

@ -11,11 +11,20 @@ vcpkg_from_github(
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT)
if ("pcre" IN_LIST FEATURES)
set(REGEX_BACKEND pcre)
elseif ("pcre2" IN_LIST FEATURES)
set(REGEX_BACKEND pcre2)
else()
set(REGEX_BACKEND builtin)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_CLAR=OFF
-DREGEX_BACKEND=${REGEX_BACKEND}
-DSTATIC_CRT=${STATIC_CRT}
)

Просмотреть файл

@ -1,5 +1,5 @@
Source: libssh
Version: 0.9.3
Version: 0.9.3-1
Homepage: https://www.libssh.org/
Description: libssh is a multiplatform C library implementing the SSHv2 protocol on client and server side
Default-Features: crypto
@ -10,7 +10,7 @@ Build-Depends: libssh[mbedtls]
Description: Default crypto backend
Feature: mbedtls
Build-Depends: mbedtls
Build-Depends: mbedtls[pthreads]
Description: Crypto support (mbedTLS)
Feature: openssl

Просмотреть файл

@ -1,4 +1,8 @@
Source: mbedtls
Version: 2.16.3
Version: 2.16.3-1
Homepage: https://github.com/ARMmbed/mbedtls
Description: An open source, portable, easy to use, readable and flexible SSL library
Feature: pthreads
Build-Depends: pthreads (windows)
Description: Multi-threading support

Просмотреть файл

@ -0,0 +1,98 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5f7d0d886..d65cfeb2b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,7 @@ endif()
option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF)
option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF)
+option(ENABLE_PTHREAD "Build mbed TLS with pthread" OFF)
option(ENABLE_PROGRAMS "Build mbed TLS programs." ON)
@@ -174,6 +175,7 @@ else()
endif()
include_directories(include/)
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
if(ENABLE_ZLIB_SUPPORT)
find_package(ZLIB)
@@ -183,6 +185,17 @@ if(ENABLE_ZLIB_SUPPORT)
endif(ZLIB_FOUND)
endif(ENABLE_ZLIB_SUPPORT)
+if(ENABLE_PTHREAD)
+ if(WIN32)
+ find_package(pthreads_windows REQUIRED)
+ include_directories(${PThreads4W_INCLUDE_DIR})
+ else()
+ set(CMAKE_THREAD_PREFER_PTHREAD ON)
+ find_package(Threads REQUIRED)
+ endif()
+ set(LINK_WITH_PTHREAD ON)
+endif()
+
add_subdirectory(library)
add_subdirectory(include)
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index c2f2bd4e6..e110cd50c 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -1,9 +1,13 @@
option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON)
+configure_file(mbedtls/config_threading.h.in mbedtls/config_threading.h)
+
if(INSTALL_MBEDTLS_HEADERS)
file(GLOB headers "mbedtls/*.h")
+ set(headers ${headers} ${CMAKE_CURRENT_BINARY_DIR}/mbedtls/config_threading.h)
+
install(FILES ${headers}
DESTINATION include/mbedtls
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h
index 5df962ef6..f205bf599 100644
--- a/include/mbedtls/config.h
+++ b/include/mbedtls/config.h
@@ -26,6 +26,8 @@
* This file is part of mbed TLS (https://tls.mbed.org)
*/
+#include "mbedtls/config_threading.h"
+
#ifndef MBEDTLS_CONFIG_H
#define MBEDTLS_CONFIG_H
diff --git a/include/mbedtls/config_threading.h.in b/include/mbedtls/config_threading.h.in
new file mode 100644
index 000000000..f6286ed9c
--- /dev/null
+++ b/include/mbedtls/config_threading.h.in
@@ -0,0 +1,6 @@
+#cmakedefine ENABLE_PTHREAD
+
+#ifdef ENABLE_PTHREAD
+#define MBEDTLS_THREADING_C
+#define MBEDTLS_THREADING_PTHREAD
+#endif
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index 9330cff9b..54a815ee7 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -128,7 +128,11 @@ if(ENABLE_ZLIB_SUPPORT)
endif(ENABLE_ZLIB_SUPPORT)
if(LINK_WITH_PTHREAD)
- set(libs ${libs} pthread)
+ if(WIN32)
+ set(libs ${libs} ${PThreads4W_LIBRARY})
+ else()
+ set(libs ${libs} pthread)
+ endif()
endif()
if (NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY)

Просмотреть файл

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
set(VCPKG_LIBRARY_LINKAGE static)
vcpkg_from_github(
@ -8,12 +6,21 @@ vcpkg_from_github(
REF mbedtls-2.16.3
SHA512 3d798f7de9c33325585d5d7c8608cc16acdcf42c246d283b2fb8a29f5e419f2899342965ff297432ef2ab20c91eaee28d6ca53349f5a68b0a4fd29d6905fc64c
HEAD_REF master
PATCHES
enable-pthread.patch
)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
pthreads ENABLE_PTHREAD
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
${FEATURE_OPTIONS}
-DENABLE_TESTING=OFF
-DENABLE_PROGRAMS=OFF
)
@ -24,4 +31,8 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mbedtls RENAME copyright)
if(WIN32 AND pthreads IN_LIST FEATURES)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/mbedtls)
endif()
vcpkg_copy_pdbs()

Просмотреть файл

@ -0,0 +1,29 @@
include(FindPackageHandleStandardArgs)
find_path(MBEDTLS_INCLUDE_DIR mbedtls/ssl.h)
find_library(MBEDTLS_CRYPTO_LIBRARY mbedcrypto)
find_package(pthreads_windows QUIET)
set(MBEDTLS_CRYPTO_LIBRARY ${MBEDTLS_CRYPTO_LIBRARY} ${PThreads4W_LIBRARY})
find_library(MBEDTLS_X509_LIBRARY mbedx509)
find_library(MBEDTLS_TLS_LIBRARY mbedtls)
set(MBEDTLS_LIBRARIES ${MBEDTLS_CRYPTO_LIBRARY} ${MBEDTLS_X509_LIBRARY} ${MBEDTLS_TLS_LIBRARY})
if (MBEDTLS_INCLUDE_DIR AND EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h")
file(
STRINGS ${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h _MBEDTLS_VERLINE
REGEX "^#define[ \t]+MBEDTLS_VERSION_STRING[\t ].*"
)
string(REGEX REPLACE ".*MBEDTLS_VERSION_STRING[\t ]+\"(.*)\"" "\\1" MBEDTLS_VERSION ${_MBEDTLS_VERLINE})
endif()
find_package_handle_standard_args(
mbedTLS
REQUIRED_VARS
MBEDTLS_INCLUDE_DIR
MBEDTLS_CRYPTO_LIBRARY
MBEDTLS_X509_LIBRARY
MBEDTLS_TLS_LIBRARY
PThreads4W_FOUND
VERSION_VAR MBEDTLS_VERSION
)

Просмотреть файл

@ -1,4 +1,4 @@
Source: pcre
Version: 8.41-4
Version: 8.44
Homepage: https://www.pcre.org/
Description: Perl Compatible Regular Expressions

Просмотреть файл

@ -1,60 +0,0 @@
diff --git a/sljit/sljitConfigInternal.h b/sljit/sljitConfigInternal.h
index 4dc452f..5a9827d 100644
--- "a/sljit/sljitConfigInternal.h"
+++ "b/sljit/sljitConfigInternal.h"
@@ -149,7 +149,7 @@
#if defined(_M_X64) || defined(__x86_64__)
#define SLJIT_CONFIG_X86_64 1
-#elif defined(_ARM_)
+#elif defined(_M_ARM)
#define SLJIT_CONFIG_ARM_V5 1
#else
#define SLJIT_CONFIG_X86_32 1
@@ -332,9 +332,16 @@
#else
+#if defined(__linux__)
/* Calls __ARM_NR_cacheflush on ARM-Linux. */
#define SLJIT_CACHE_FLUSH(from, to) \
__clear_cache((char*)(from), (char*)(to))
+#elif(_WIN32)
+#pragma comment(lib, "kernel32.lib")
+uint32_t FlushInstructionCache(void *hProcess, void *lpBaseAddress, uintptr_t dwSize);
+#define SLJIT_CACHE_FLUSH(from, to) \
+ FlushInstructionCache(GetCurrentProcess(), (void*)(from), (uintptr_t)(to - from));
+#endif
#endif
diff --git a/sljit/sljitNativeARM_32.c b/sljit/sljitNativeARM_32.c
index 745da99..83942b0 100644
--- a/sljit/sljitNativeARM_32.c
+++ b/sljit/sljitNativeARM_32.c
@@ -1573,12 +1573,8 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3
extern "C" {
#endif
-#if defined(__GNUC__)
extern unsigned int __aeabi_uidivmod(unsigned int numerator, unsigned int denominator);
extern int __aeabi_idivmod(int numerator, int denominator);
-#else
-#error "Software divmod functions are needed"
-#endif
#ifdef __cplusplus
}
@@ -1635,12 +1631,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile
}
}
-#if defined(__GNUC__)
FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM,
((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod))));
-#else
-#error "Software divmod functions are needed"
-#endif
if (saved_reg_count > 0) {
if (saved_reg_count >= 3) {

Просмотреть файл

@ -1,21 +0,0 @@
diff --git a/sljit/sljitConfigInternal.h b/sljit/sljitConfigInternal.h
index 2bda29e..56ba7a6 100644
--- a/sljit/sljitConfigInternal.h
+++ b/sljit/sljitConfigInternal.h
@@ -151,6 +151,8 @@
#define SLJIT_CONFIG_X86_64 1
#elif defined(_M_ARM)
#define SLJIT_CONFIG_ARM_V5 1
+#elif defined(_M_ARM64)
+#define SLJIT_CONFIG_ARM_64 1
#else
#define SLJIT_CONFIG_X86_32 1
#endif
@@ -330,7 +332,6 @@
__clear_cache((char*)(from), (char*)(to))
#elif(_WIN32)
#pragma comment(lib, "kernel32.lib")
-uint32_t FlushInstructionCache(void *hProcess, void *lpBaseAddress, uintptr_t dwSize);
#define SLJIT_CACHE_FLUSH(from, to) \
FlushInstructionCache(GetCurrentProcess(), (void*)(from), (uintptr_t)(to - from));
#endif

Просмотреть файл

@ -1,24 +0,0 @@
diff --git b/CMakeLists.txt a/CMakeLists.txt
index 858a34bd..d1a64570 100644
--- b/CMakeLists.txt
+++ a/CMakeLists.txt
@@ -74,7 +74,6 @@ PROJECT(PCRE C CXX)
# CMP0026 to avoid warnings for the use of LOCATION in GET_TARGET_PROPERTY.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
-CMAKE_POLICY(SET CMP0026 OLD)
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake
@@ -191,9 +190,8 @@ IF (MINGW)
ENDIF(MINGW)
IF(MSVC)
- OPTION(PCRE_STATIC_RUNTIME
- "ON=Compile against the static runtime (/MT)."
- OFF)
+ add_definitions(/wd4703 /wd4146 /wd4308)
+ OPTION(PCRE_STATIC_RUNTIME "ON=Compile against the static runtime (/MT)." OFF)
OPTION(INSTALL_MSVC_PDB
"ON=Install .pdb files built by MSVC, if generated"
OFF)

Просмотреть файл

@ -0,0 +1,18 @@
--- a/CMakeLists.txt 2017-01-23 16:33:46.000000000 +0100
+++ b/CMakeLists.txt 2020-03-08 21:12:00.225068400 +0100
@@ -74,7 +74,6 @@
# CMP0026 to avoid warnings for the use of LOCATION in GET_TARGET_PROPERTY.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
-CMAKE_POLICY(SET CMP0026 OLD)
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake
@@ -191,6 +190,7 @@
ENDIF(MINGW)
IF(MSVC)
+ add_definitions(/wd4703 /wd4146 /wd4308)
OPTION(PCRE_STATIC_RUNTIME
"ON=Compile against the static runtime (/MT)."
OFF)

Просмотреть файл

@ -1,21 +1,20 @@
include(vcpkg_common_functions)
set(PCRE_VERSION 8.41)
set(PCRE_VERSION 8.44)
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.pcre.org/pub/pcre/pcre-${PCRE_VERSION}.zip"
"https://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VERSION}/pcre-${PCRE_VERSION}.zip"
FILENAME "pcre-${PCRE_VERSION}.zip"
SHA512 a3fd57090a5d9ce9d608aeecd59f42f04deea5b86a5c5899bdb25b18d8ec3a89b2b52b62e325c6485a87411eb65f1421604f80c3eaa653bd7dbab05ad22795ea
SHA512 adddec1236b25ff1c90e73835c2ba25d60a5839cbde2d6be7838a8ec099f7443dede931dc39002943243e21afea572eda71ee8739058e72235a192e4324398f0
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
fix-option-2.patch
fix-arm-config-define.patch
fix-arm64-config-define.patch
# Fix CMake Deprecation Warning concerning OLD behavior for policy CMP0026
# Suppress MSVC compiler warnings C4703, C4146, C4308, which fixes errors
# under x64-uwp and arm-uwp
pcre-8.44_suppress_cmake_and_compiler_warnings-errors.patch
)
vcpkg_configure_cmake(

Просмотреть файл

@ -1336,7 +1336,6 @@ osgearth:x64-osx=fail
osgearth:x64-linux=fail
osgearth:x64-windows-static=fail
osg-qt:x64-windows-static=fail
osg-qt:x64-linux=fail
otl:x64-windows=ignore
otl:x64-windows-static=ignore
otl:x64-uwp=ignore