1 parent
3851aeb703
commit
053ee5b296
23 files changed
+845
-93
No files matched your search
+20
@@ -0,0 +1,20 @@
|
||||
cmake_minimum_required(VERSION 4.0)
|
||||
project(VoidExternalConsumer LANGUAGES CXX)
|
||||
|
||||
find_package(Void CONFIG REQUIRED COMPONENTS
|
||||
Net
|
||||
Security
|
||||
Sqlite
|
||||
Stacktrace
|
||||
)
|
||||
|
||||
add_executable(void_external_consumer main.cpp)
|
||||
target_link_libraries(void_external_consumer PRIVATE
|
||||
Void::Net
|
||||
Void::Security
|
||||
Void::Sqlite
|
||||
Void::Stacktrace
|
||||
)
|
||||
|
||||
enable_testing()
|
||||
add_test(NAME VoidExternalConsumer COMMAND void_external_consumer)
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
#include <Void/Net/Url.hpp>
|
||||
#include <Void/Security/Security.hpp>
|
||||
#include <Void/Sqlite/Sqlite.hpp>
|
||||
#include <Void/Stacktrace/Stacktrace.hpp>
|
||||
|
||||
#include <string>
|
||||
|
||||
int main()
|
||||
{
|
||||
const auto url = Void::Net::Url::parse("https://example.invalid/path");
|
||||
const auto token = Void::Security::hash_token("void-consumer-token");
|
||||
auto database = Void::Sqlite::Database::open(":memory:");
|
||||
const auto frames = Void::Stacktrace::capture_stacktrace(0, 1);
|
||||
|
||||
return url && url->target == "/path" && token && !token->empty() &&
|
||||
database && frames.size() <= 1
|
||||
? 0
|
||||
: 1;
|
||||
}
|
||||
@@ -54,3 +54,8 @@ run_consumer(Audited
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_PkgConfig=TRUE
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_SQLite3=TRUE)
|
||||
|
||||
# Compiled shared modules keep their third-party implementation dependencies
|
||||
# private, but every installed runtime library must remain linkable and
|
||||
# executable from a clean consumer project.
|
||||
run_consumer(External)
|
||||
Reference in new issue
Block a user