feat(lib): initialize libnextcloud C++17 library scaffolding (#25)

This commit is contained in:
2026-01-28 09:47:34 -08:00
parent e2d31dc053
commit bed4cc0121
8 changed files with 838 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.15)
# Find Google Test
find_package(GTest REQUIRED)
# Include Google Test helpers
include(GoogleTest)
# Test executable
add_executable(smoke_test
smoke_test.cpp
)
# Link against the library and GTest
target_link_libraries(smoke_test
PRIVATE
nextcloud
GTest::GTest
GTest::Main
)
# Discover and register tests
gtest_discover_tests(smoke_test)
# Add custom target to run tests
add_custom_target(run_tests
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
DEPENDS smoke_test
COMMENT "Running tests..."
)