Skip to content

Add FILE_SET and RUNTIME_DEPENDENCIES support#354

Open
solarispika wants to merge 4 commits intocheshirekow:masterfrom
solarispika:feature/file-set-and-runtime-deps
Open

Add FILE_SET and RUNTIME_DEPENDENCIES support#354
solarispika wants to merge 4 commits intocheshirekow:masterfrom
solarispika:feature/file-set-and-runtime-deps

Conversation

@solarispika
Copy link

Summary

  • Fix parse_install_targets to use parse_install_targets_sub (was dead code)
  • Add FILE_SET formatting support for target_sources() and install(TARGETS) (CMake 3.23+)
  • Add RUNTIME_DEPENDENCIES support:
    • install(RUNTIME_DEPENDENCY_SET) as standalone form
    • RUNTIME_DEPENDENCIES and RUNTIME_DEPENDENCY_SET in install(TARGETS) (CMake 3.21+)

Test plan

  • Added test cases for all new features
  • All existing tests pass
  • Formatted a real project (229 CMakeLists.txt files) without errors

parse_install_targets_sub was defined but never called. The code
incorrectly used parse_install_targets recursively for designated
kwargs (ARCHIVE, LIBRARY, RUNTIME, etc.), which was overly permissive
since it allowed top-level keywords inside nested groups.
Add support for the FILE_SET keyword used in target_sources() and
install(TARGETS) commands. FILE_SET requires a set name argument
followed by optional TYPE, BASE_DIRS, FILES, DESTINATION, etc. kwargs.

- Add FileSetNode class for parsing FILE_SET syntax
- Update target_sources() to handle FILE_SET keyword
- Update install(TARGETS) to handle FILE_SET with its specific subparser
- Add tests for adding new keywords
Add support for runtime dependency handling in install():
- RUNTIME_DEPENDENCY_SET as standalone install form
- RUNTIME_DEPENDENCIES and RUNTIME_DEPENDENCY_SET in install(TARGETS)

Both support filtering options (PRE/POST_INCLUDE/EXCLUDE_REGEXES,
POST_INCLUDE/EXCLUDE_FILES, DIRECTORIES).
@solarispika solarispika force-pushed the feature/file-set-and-runtime-deps branch from fafbde8 to 4f20617 Compare December 30, 2025 07:59
@Spixmaster
Copy link

Might I ask you to also support CXX_MODULES_BMI? It causes issues for me so I think it is also not supported currently.

However, thank you very much for your work! I hope that this project ist not dead.

CXX_MODULES_BMI is an artifact kind for installing Binary Module
Interface files from C++20 modules. It supports the same options as
other artifact kinds: DESTINATION, PERMISSIONS, CONFIGURATIONS,
COMPONENT, OPTIONAL, EXCLUDE_FROM_ALL.
@solarispika
Copy link
Author

@Spixmaster Sure, I've pushed new commit for CXX_MODULES_BMI support.
Check and see if it helps.

@solarispika solarispika force-pushed the feature/file-set-and-runtime-deps branch 2 times, most recently from e2e0f69 to 38945f8 Compare February 24, 2026 06:51
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