mirror of
https://github.com/logos-co/logos-test-modules.git
synced 2026-08-31 04:01:16 +00:00
* feat: test-interface-module-cpp — dependency-interface smoke test Add a universal core module that declares a LOCAL basic_calc interface (interfaces/basic_calc.h, a subset of test_basic_module_cpp's API) and binds it to a module name at runtime via modules().bind_basic_calc(name), exercising the bound wrapper's typed sync + event accessors plus the no-validation path. Registered in flake.nix (modules + packages). Requires logos-cpp-sdk#74, logos-module-builder#108, logos-plugin-qt#8. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * address review: make basic_calc.h valid C++ standalone Include logos_module_context.h in the interface header so the logos_events token (it expands to public) is defined — the header is now valid C++ on its own, not only as generator input. (Copilot review, PR #20.) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * bump module-builder --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
23 lines
900 B
CMake
23 lines
900 B
CMake
cmake_minimum_required(VERSION 3.14)
|
|
project(TestInterfaceModuleCppPlugin LANGUAGES CXX)
|
|
|
|
if(DEFINED ENV{LOGOS_MODULE_BUILDER_ROOT})
|
|
include($ENV{LOGOS_MODULE_BUILDER_ROOT}/cmake/LogosModule.cmake)
|
|
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/LogosModule.cmake")
|
|
include(cmake/LogosModule.cmake)
|
|
else()
|
|
message(FATAL_ERROR "LogosModule.cmake not found")
|
|
endif()
|
|
|
|
# Universal module. The builder runs `logos-cpp-generator --from-header`
|
|
# to produce the Qt glue, and (because metadata.json declares
|
|
# `interface_dependencies`) `--interface basic_calc=interfaces/basic_calc.h=IBasicCalc`
|
|
# to produce the bound `BasicCalc` wrapper + `bind_basic_calc` factory.
|
|
# LogosModule.cmake picks up the generated files from generated_code/.
|
|
logos_module(
|
|
NAME test_interface_module_cpp
|
|
SOURCES
|
|
src/test_interface_module_cpp_impl.h
|
|
src/test_interface_module_cpp_impl.cpp
|
|
)
|