This commit is contained in:
Yue 2022-01-14 01:23:06 +08:00 коммит произвёл GitHub
Родитель 59706ba512
Коммит 218ea21905
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 74 добавлений и 74 удалений

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

@ -1,22 +1,22 @@
diff -urN a/runtime/src/support/guid.h b/runtime/src/support/guid.h
--- a/runtime/src/support/guid.h
+++ b/runtime/src/support/guid.h
@@ -38,7 +38,7 @@
diff -urN a/runtime/src/support/Guid.h b/runtime/src/support/Guid.h
--- a/runtime/src/support/Guid.h
+++ b/runtime/src/support/Guid.h
@@ -42,7 +42,7 @@ namespace antlrcpp {
// 16 byte value that can be passed around by value. It also supports
// conversion to string (via the stream operator <<) and conversion from a
// string via constructor.
-class Guid
+class ANTLR4CPP_PUBLIC Guid
{
-class Guid final {
+class ANTLR4CPP_PUBLIC Guid final {
public:
@@ -90,7 +90,7 @@
using size_type = typename std::array<uint8_t, 16>::size_type;
using pointer = typename std::array<uint8_t, 16>::pointer;
@@ -131,7 +131,7 @@ private:
// function would no longer be cross-platform if we parameterized the android
// version. Instead, construction of the GuidGenerator may be different on
// each platform, but the use of newGuid is uniform.
-class GuidGenerator
+class ANTLR4CPP_PUBLIC GuidGenerator
{
-class GuidGenerator final {
+class ANTLR4CPP_PUBLIC GuidGenerator final {
public:
#ifdef GUID_ANDROID
GuidGenerator(JNIEnv *env);

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

@ -1,45 +1,31 @@
diff --git a/runtime/Cpp/runtime/CMakeLists.txt b/runtime/Cpp/runtime/CMakeLists.txt
index a8503bb61..e7b01b7cb 100644
diff -urN a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -1,17 +1,3 @@
-
-include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
-
-set(THIRDPARTY_DIR ${CMAKE_BINARY_DIR}/runtime/thirdparty)
-set(UTFCPP_DIR ${THIRDPARTY_DIR}/utfcpp)
-ExternalProject_Add(
- utfcpp
- GIT_REPOSITORY "git://github.com/nemtrif/utfcpp"
@@ -51,27 +51,6 @@ else()
if (utf8cpp_HEADER)
include_directories(${utf8cpp_HEADER})
- else()
- include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
- set(THIRDPARTY_DIR ${CMAKE_BINARY_DIR}/runtime/thirdparty)
- set(UTFCPP_DIR ${THIRDPARTY_DIR}/utfcpp)
- ExternalProject_Add(
- utf8cpp
- GIT_REPOSITORY "https://github.com/nemtrif/utfcpp"
- GIT_TAG "v3.1.1"
- SOURCE_DIR ${UTFCPP_DIR}
- UPDATE_DISCONNECTED 1
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${UTFCPP_DIR}/install -Dgtest_force_shared_crt=ON
- TEST_AFTER_INSTALL 1
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${UTFCPP_DIR}/install -DUTF8_TESTS=off -DUTF8_SAMPLES=off
- STEP_TARGETS build)
include_directories(
@@ -23,8 +13,6 @@ include_directories(
${PROJECT_SOURCE_DIR}/runtime/src/tree
${PROJECT_SOURCE_DIR}/runtime/src/tree/pattern
${PROJECT_SOURCE_DIR}/runtime/src/tree/xpath
-
- include_directories(
- ${UTFCPP_DIR}/install/include/utf8cpp
- ${UTFCPP_DIR}/install/include/utf8cpp/utf8
)
@@ -131,13 +119,6 @@ install(DIRECTORY "${PROJECT_SOURCE_DIR}/runtime/src/"
FILES_MATCHING PATTERN "*.h"
)
-install(FILES "${UTFCPP_DIR}/source/utf8.h"
- DESTINATION "include/antlr4-runtime")
-install(DIRECTORY "${UTFCPP_DIR}/source/utf8"
- DESTINATION "include/antlr4-runtime"
- COMPONENT dev
- FILES_MATCHING PATTERN "*.h"
- )
-
- add_dependencies(antlr4_shared utf8cpp)
- add_dependencies(antlr4_static utf8cpp)
- set(INSTALL_utf8cpp TRUE)
endif()
endif()

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

@ -1,11 +1,11 @@
vcpkg_fail_port_install(ON_TARGET "uwp")
set(VERSION 4.9.1)
set(VERSION 4.9.3)
vcpkg_download_distfile(ARCHIVE
URLS "https://www.antlr.org/download/antlr4-cpp-runtime-${VERSION}-source.zip"
FILENAME "antlr4-cpp-runtime-${VERSION}-source.zip"
SHA512 fe33005f73f8d408fcea8ebab62c0def119bbe0c075f04a66404d0df258126eb6caf0a8bbac34d5c4c9e79d4aa8896f32698a560d4be7d71a32dcc3457245cee
SHA512 23995a6fa661ff038142fa7220a195db3a9a26744d516011dedc3192f152b06a8e31f6cc8f969f8927b86392a960d03e89572e753f033f950839a5bd38d4c722
)
# license not exist in antlr folder.
@ -27,14 +27,13 @@ vcpkg_extract_source_archive_ex(
fix_utfcpp_dependency.patch
)
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG -DLIB_OUTPUT_DIR=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/dist
OPTIONS_RELEASE -DLIB_OUTPUT_DIR=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/dist
)
vcpkg_install_cmake()
vcpkg_cmake_install()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc
${CURRENT_PACKAGES_DIR}/debug/share

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

@ -1,7 +1,7 @@
diff -urN a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,8 +40,10 @@
@@ -42,8 +42,10 @@ if(CMAKE_VERSION VERSION_EQUAL "3.3.0" OR
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
@ -14,15 +14,22 @@ diff -urN a/CMakeLists.txt b/CMakeLists.txt
endif()
if(APPLE)
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
diff -urN a/runtime/src/support/guid.cpp b/runtime/src/support/guid.cpp
--- a/runtime/src/support/guid.cpp
+++ b/runtime/src/support/guid.cpp
@@ -22,6 +22,7 @@
THE SOFTWARE.
*/
diff --git a/runtime/src/support/Guid.cpp b/runtime/src/support/Guid.cpp
--- a/runtime/src/support/Guid.cpp
+++ b/runtime/src/support/Guid.cpp
@@ -24,6 +24,7 @@
#include <algorithm>
+#include "antlr4-common.h"
#include "guid.h"
#include "Guid.h"
#ifdef GUID_LIBUUID
@@ -35,6 +36,7 @@
#endif
#ifdef GUID_WINDOWS
+#define NOMINMAX
#include <objbase.h>
#endif

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

@ -1,7 +1,6 @@
{
"name": "antlr4",
"version": "4.9.1",
"port-version": 2,
"version": "4.9.3",
"description": "ANother Tool for Language Recognition",
"homepage": "https://www.antlr.org",
"supports": "!uwp",
@ -9,6 +8,10 @@
{
"name": "libuuid",
"platform": "!uwp & !windows & !osx"
},
{
"name": "vcpkg-cmake",
"host": true
}
]
}

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

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "55208ea9aa8be016d24423442ffbb2e31a7390a1",
"version": "4.9.3",
"port-version": 0
},
{
"git-tree": "31ac3fa20b3f7944e5ac32b7ac7883f3d976dae6",
"version": "4.9.1",

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

@ -89,8 +89,8 @@
"port-version": 2
},
"antlr4": {
"baseline": "4.9.1",
"port-version": 2
"baseline": "4.9.3",
"port-version": 0
},
"any-lite": {
"baseline": "0.4.0",