Skip to content

CMake: build DocumentQueue.cpp once in doculith_core, link executable against it - #12

Closed
sromic1990 with Copilot wants to merge 2 commits into
feature/core/1-handling-file-managementfrom
copilot/sub-pr-9-another-one
Closed

sromic1990 with Copilot wants to merge 2 commits into
feature/core/1-handling-file-managementfrom
copilot/sub-pr-9-another-one

Conversation

Copilot AI commented Mar 21, 2026 •

Copy link
Copy Markdown
Contributor

DocumentQueue.cpp was compiled into both the doculith executable and the doculith_core library, duplicating compilation and creating a drift risk between the two build targets.

Changes

  • Reorder targets: doculith_core is now declared before doculith to reflect the dependency direction
  • Single compilation unit: DocumentQueue.cpp removed from doculith sources; built only in doculith_core
  • Transitive propagation: doculith_core uses PUBLIC for both target_include_directories(src) and target_link_libraries(nfd), so dependents get headers and nfd automatically
  • Link cleanly: doculith links against doculith_core instead of listing nfd directly
add_library(doculith_core src/DocumentQueue.cpp)
target_include_directories(doculith_core PUBLIC src)
target_link_libraries(doculith_core PUBLIC nfd)

add_executable(doculith src/main.cpp src/Application.cpp src/Ui.cpp ...)
target_link_libraries(doculith PRIVATE imgui_lib doculith_core)

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

…th against doculith_core

Co-authored-by: sromic1990 <13477194+sromic1990@users.noreply.github.com>
Agent-Logs-Url: https://github.com/sromic1990/Doculith/sessions/cfa49bab-be9d-475f-8f21-6eab0eac62df
Copilot AI changed the title [WIP] [WIP] Address feedback on file management handling features CMake: build DocumentQueue.cpp once in doculith_core, link executable against it Mar 21, 2026
Copilot AI requested a review from sromic1990 March 21, 2026 23:04

@sromic1990 sromic1990 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sromic1990
sromic1990 marked this pull request as ready for review March 21, 2026 23:12
@sromic1990 sromic1990 closed this Mar 21, 2026
@sromic1990
sromic1990 deleted the copilot/sub-pr-9-another-one branch March 21, 2026 23:13
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.

2 participants