What
Add a new helper to cmake/template/targets.cmake that wraps the common pattern of attaching one or more $<BUILD_INTERFACE:...>-only include directories to a target.
Proposed signature:
kcenon_template_add_build_interface_includes(<target> <visibility> <dir>...)
Attach BUILD_INTERFACE include directories to <target> for each <dir>.
Why
pacs_system defines an inline equivalent (pacs_add_build_interface_include_dirs) at cmake/options.cmake because the existing template helper kcenon_template_setup_target_includes always pairs BUILD_INTERFACE with INSTALL_INTERFACE. There are real cases (build-only test fixtures, generated code that should not be installed) where only BUILD_INTERFACE is desired.
Promoting the helper to the template would let pacs_system delete the local copy and align other systems on the same name.
Where
cmake/template/targets.cmake
- Template VERSION bump: 1.0.0 -> 1.1.0 (MINOR per template versioning policy: new helper added).
How
Acceptance Criteria
Source Reference
The pacs_system inline implementation can be used as the starting point: https://github.com/kcenon/pacs_system/blob/develop/cmake/options.cmake#L97-L105 (function pacs_add_build_interface_include_dirs).
Context
Discovered during the cmake-template alignment of pacs_system (kcenon/pacs_system#1140, part of kcenon/pacs_system#1137).
What
Add a new helper to
cmake/template/targets.cmakethat wraps the common pattern of attaching one or more$<BUILD_INTERFACE:...>-only include directories to a target.Proposed signature:
Why
pacs_systemdefines an inline equivalent (pacs_add_build_interface_include_dirs) atcmake/options.cmakebecause the existing template helperkcenon_template_setup_target_includesalways pairs BUILD_INTERFACE with INSTALL_INTERFACE. There are real cases (build-only test fixtures, generated code that should not be installed) where only BUILD_INTERFACE is desired.Promoting the helper to the template would let pacs_system delete the local copy and align other systems on the same name.
Where
cmake/template/targets.cmakeHow
Acceptance Criteria
targets.cmakewith documentation in the file headerSource Reference
The pacs_system inline implementation can be used as the starting point: https://github.com/kcenon/pacs_system/blob/develop/cmake/options.cmake#L97-L105 (function
pacs_add_build_interface_include_dirs).Context
Discovered during the cmake-template alignment of pacs_system (kcenon/pacs_system#1140, part of kcenon/pacs_system#1137).