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,24 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 136edff..9d29522 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -288,6 +288,10 @@ if(US_COMPILER_APPLE_CLANG OR US_COMPILER_CLANG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif()
+# Dependency
+find_package(GTest CONFIG REQUIRED)
+link_libraries(GTest::gtest GTest::gmock)
+
#-----------------------------------------------------------------------------
# Testing configuration
#-----------------------------------------------------------------------------
@@ -338,7 +342,7 @@ if(US_BUILD_TESTING)
endif()
if(US_USE_SYSTEM_GTEST)
- find_package(GTest REQUIRED)
+ find_package(GTest CONFIG REQUIRED)
else()
# This keeps GTest CMake variables hidden from users unless they explicitly want to view/modify them.
us_cache_var(BUILD_GMOCK ON BOOL "Build GMock" ADVANCED FORCE)

View File

@@ -0,0 +1,25 @@
diff --git a/httpservice/src/ServletContainer.cpp b/httpservice/src/ServletContainer.cpp
index b4af8c9..8713066 100644
--- a/httpservice/src/ServletContainer.cpp
+++ b/httpservice/src/ServletContainer.cpp
@@ -279,7 +279,9 @@ void ServletContainer::SetContextPath(const std::string& path)
std::string ServletContainer::GetContextPath() const
{
- return Lock(d->m_Mutex), d->m_ContextPath;
+ Lock l(d->m_Mutex);
+ US_UNUSED(l);
+ return d->m_ContextPath;
}
void ServletContainer::Start()
@@ -306,6 +308,8 @@ std::shared_ptr<ServletContext> ServletContainer::GetContext(
std::string ServletContainer::GetContextPath(
const ServletContext* /*context*/) const
{
- return Lock(d->m_Mutex), d->m_ContextPath;
+ Lock l(d->m_Mutex);
+ US_UNUSED(l);
+ return d->m_ContextPath;
}
}

View File

@@ -0,0 +1,36 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO CppMicroServices/CppMicroservices
REF v3.6.0
SHA512 C1407E1D3C2FD31675C32D8C00F7D005C09B03A835D5B09411B0043DDEAF5E3A1A0C7A5FA34FA04D5A643169D222D0E8D3A3C31CDA69FB64CDF1A8CCA276BE18
HEAD_REF development
PATCHES
werror.patch
fix-dependency-gtest.patch
fix-warning-c4834.patch
)
vcpkg_configure_cmake(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
OPTIONS
-DTOOLS_INSTALL_DIR:STRING=tools/cppmicroservices
-DAUXILIARY_INSTALL_DIR:STRING=share/cppmicroservices
-DUS_USE_SYSTEM_GTEST=TRUE
)
vcpkg_install_cmake()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_fixup_cmake_targets()
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
# CppMicroServices uses a custom resource compiler to compile resources
# the zipped resources are then appended to the target which cause the linker to crash
# when compiling a static library
if(NOT BUILD_SHARED_LIBS)
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
endif()

View File

@@ -0,0 +1,9 @@
{
"name": "cppmicroservices",
"version": "3.6.0",
"description": "An OSGi-like C++ dynamic module system and service registry",
"homepage": "https://github.com/CppMicroServices/CppMicroServices",
"dependencies": [
"gtest"
]
}

View File

@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 24fd87e..974064c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -382,7 +382,7 @@ else()
usFunctionCheckCompilerFlags(-fstack-protector-all US_CXX_FLAGS)
endif()
- foreach(_cxxflag -Werror -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align
+ foreach(_cxxflag -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align
-Wwrite-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wold-style-cast
-Wstrict-null-sentinel -Wsign-promo -fdiagnostics-show-option )
usFunctionCheckCompilerFlags(${_cxxflag} US_CXX_FLAGS)