early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,56 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f2f8eaa..1b0c01c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,7 @@ set (BOND_FIND_RAPIDJSON
# settings so that we don't apply our settings to third-party code.
add_subdirectory (thirdparty)
-enable_testing()
+#enable_testing()
set (BOND_IDL ${CMAKE_CURRENT_SOURCE_DIR}/idl)
set (BOND_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/cpp/inc)
@@ -85,6 +85,6 @@ if (BOND_GBC_PATH)
install (
FILES ${BOND_GBC_PATH}
- DESTINATION bin
+ DESTINATION tools
RENAME ${INSTALLED_GBC_NAME})
endif()
diff --git a/compiler/CMakeLists.txt b/compiler/CMakeLists.txt
index 1dff9d0..9a11575 100644
--- a/compiler/CMakeLists.txt
+++ b/compiler/CMakeLists.txt
@@ -108,7 +108,7 @@ set (test_sources
tests/TestMain.hs
${tests})
-set (completion_dir etc/bash_completion.d)
+set (completion_dir tools/bond)
set (completion ${CMAKE_CURRENT_BINARY_DIR}/gbc.comp)
set (output ${CMAKE_CURRENT_BINARY_DIR}/build/gbc/gbc${CMAKE_EXECUTABLE_SUFFIX})
set (GBC_EXECUTABLE ${output} PARENT_SCOPE)
@@ -130,7 +130,7 @@ endif()
install (FILES ${output}
PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
- DESTINATION bin)
+ DESTINATION ${completion_dir})
install (FILES ${completion}
RENAME gbc
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index b45078e..1eebe9c 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -110,7 +110,7 @@ target_include_directories (bond_apply BEFORE PRIVATE
install (TARGETS bond bond_apply
EXPORT bond
- ARCHIVE DESTINATION lib/bond
+ ARCHIVE DESTINATION lib
INCLUDES DESTINATION include)
install (DIRECTORY ${BOND_IDL}/bond/core DESTINATION include/bond)

74
externals/vcpkg/ports/bond/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,74 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
set(BOND_VER 9.0.3)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO microsoft/bond
REF ${BOND_VER}
SHA512 3a7884eb00e6d0ab40c688f4a40cb2d3f356c48b38d48a9a08c756047a94b82619ef345483f42c3240732f5da06816b65a61acb83bfebb3c2c6b44099ce71bf9
HEAD_REF master
PATCHES fix-install-path.patch skip-grpc-compilation.patch
)
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_download_distfile(GBC_ARCHIVE
URLS "https://github.com/microsoft/bond/releases/download/${BOND_VER}/gbc-${BOND_VER}-amd64.zip"
FILENAME "gbc-${BOND_VER}-amd64.zip"
SHA512 41a4e01a9a0f6246a3c07f516f2c0cfc8a837eff2166c2bb787877e409d6f55eeb6084e63aabc3502492775a3fa7e381bf37fde0bdfced50a9d0b39dfaca7dfd
)
# Clear the generator to prevent it from updating
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/tools/")
# Extract the precompiled gbc
vcpkg_extract_source_archive(extracted_tool_dir ARCHIVE "${GBC_ARCHIVE}" NO_REMOVE_ONE_LEVEL)
file(RENAME "${extracted_tool_dir}" "${CURRENT_BUILDTREES_DIR}/tools")
set(FETCHED_GBC_PATH "${CURRENT_BUILDTREES_DIR}/tools/gbc-${BOND_VER}-amd64.exe")
if(NOT EXISTS "${FETCHED_GBC_PATH}")
message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exist, but it doesn't.")
endif()
else()
# According to the readme on https://github.com/microsoft/bond/
# The build needs a version of the Haskel Tool stack that is newer than some distros ship with.
# For this reason the message is not guarded by checking to see if the tool is installed.
message("\nA recent version of Haskell Tool Stack is required to build.\n For information on how to install see https://docs.haskellstack.org/en/stable/README/\n")
endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
bond-over-grpc BOND_ENABLE_GRPC
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DBOND_LIBRARIES_ONLY=TRUE
-DBOND_GBC_PATH=${FETCHED_GBC_PATH}
-DBOND_SKIP_GBC_TESTS=TRUE
-DBOND_ENABLE_COMM=FALSE
-DBOND_FIND_RAPIDJSON=TRUE
-DBOND_STACK_OPTIONS=--allow-different-user
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/bond)
vcpkg_copy_pdbs()
cmake_path(NATIVE_PATH SOURCE_PATH native_source_path)
foreach(header bond_apply.h bond_const_apply.h bond_const_enum.h bond_const_reflection.h bond_const_types.h bond_enum.h bond_reflection.h bond_types.h)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/bond/core/${header}" "${native_source_path}" "")
endforeach()
# There's no way to supress installation of the headers in the debug build,
# so we just delete them.
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
# Put the license file where vcpkg expects it
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@@ -0,0 +1,11 @@
diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt
index f8c7bf3..e69de29 100644
--- a/thirdparty/CMakeLists.txt
+++ b/thirdparty/CMakeLists.txt
@@ -1,6 +0,0 @@
-include (Compiler)
-
-if (BOND_ENABLE_GRPC)
- cxx_add_compile_options (Clang -Wno-unused-value)
- add_subdirectory(grpc)
-endif()

30
externals/vcpkg/ports/bond/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,30 @@
{
"name": "bond",
"version": "9.0.3",
"port-version": 3,
"description": "Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.",
"homepage": "https://github.com/Microsoft/bond",
"dependencies": [
"boost-assign",
"boost-config",
"boost-locale",
"boost-utility",
"rapidjson",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"bond-over-grpc": {
"description": "Bond-over-gRPC provides code generation from Bond IDL service definitions to send Bond objects via gRPC.",
"dependencies": [
"grpc"
]
}
}
}