Skip to content

Add DMOD_MODULE mode support to dmosi#30

Merged
JohnAmadis merged 2 commits intomainfrom
copilot/update-interface-for-dmod-module
Feb 23, 2026
Merged

Add DMOD_MODULE mode support to dmosi#30
JohnAmadis merged 2 commits intomainfrom
copilot/update-interface-for-dmod-module

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 23, 2026

dmosi was only usable in DMOD_SYSTEM mode. Modules needing OS interface access had no way to link against dmosi without pulling in the full system-mode implementation. This follows the pattern established in dmlist.

CMakeLists.txt

  • Include ${DMOD_DIR}/paths.cmake to resolve DMOD_SYSTEM/DMOD_MODULE booleans
  • Add dmosi_if INTERFACE library exposing only the include directory — linkable by modules in any build mode
  • Guard the dmosi STATIC library (implementation, compile definitions, coverage, makefile generation) under if(DMOD_SYSTEM)
add_library(dmosi_if INTERFACE)
target_include_directories(dmosi_if INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)

if(DMOD_SYSTEM)
    add_library(dmosi STATIC src/dmosi.c)
    # ... full implementation targets
endif()

CI Workflow

  • Add a DMOD_MODULE mode build leg (-DDMOD_MODE=DMOD_MODULE) that verifies libdmosi.a is not produced (only the interface target is built in module mode)
Original prompt

This section details on the original issue you should resolve

<issue_title>dostosować interfejs do użytkowania w modułach</issue_title>
<issue_description>Aktualnie interfejs jest przystosowany tylko do wykorzystania w trybie DMOD_SYSTEM - trzeba go jeszcze przygotować do użycia w trybie DMOD_MODULE tak jak to zostało zrobione w dmlist:

https://github.com/choco-technologies/dmlist</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Copilot AI changed the title [WIP] Adjust interface for use in DMOD_MODULE mode Add DMOD_MODULE mode support to dmosi Feb 23, 2026
Copilot AI requested a review from JohnAmadis February 23, 2026 19:16
@JohnAmadis JohnAmadis marked this pull request as ready for review February 23, 2026 19:17
@JohnAmadis JohnAmadis merged commit 2920b2e into main Feb 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dostosować interfejs do użytkowania w modułach

2 participants