Skip to content

Default generation of CMake config packages to ON#245

Merged
bretbrownjr merged 1 commit intobemanproject:mainfrom
bretbrownjr:better-defaults
Sep 10, 2025
Merged

Default generation of CMake config packages to ON#245
bretbrownjr merged 1 commit intobemanproject:mainfrom
bretbrownjr:better-defaults

Conversation

@bretbrownjr
Copy link
Copy Markdown
Member

Problem

When consuming this project as a package, consumers will receive errors when executing find_package(beman.exemplar). This is because by default the required CMake files are not installed with the package.

Solution

Bump the version of the infra subdirectory to use a new release of the beman-install-library CMake module that provides support for BEMAN_EXEMPLAR_INSTALL_CONFIG_FILE_PACKAGE and BEMAN_INSTALL_CONFIG_FILE_PACKAGES options.

This change is not anticipated to affect FetchContent or other kinds of vendored workflows since installation of libraries is primarily a packaging activity. Even in that case, it is harmless to consumers to install CMake modules that are not used.

Also included in this change is improvements to the beman.exemplar README to note the existence of the BEMAN_EXEMPLAR_INSTALL_CONFIG_FILE_PACKAGE option.

Documentation in README.md was also updated to reflect the new installation behavior for cmake --workflow --preset [...] workflows.

@coveralls
Copy link
Copy Markdown

coveralls commented Sep 7, 2025

Coverage Status

coverage: 100.0%. remained the same
when pulling 19d99a4 on bretbrownjr:better-defaults
into c6d1432 on bemanproject:main.

Comment thread CMakeLists.txt
Comment thread CMakeLists.txt
Comment thread README.md
Comment thread README.md
Comment thread README.md
@bretbrownjr bretbrownjr force-pushed the better-defaults branch 2 times, most recently from be5ac83 to e23440d Compare September 7, 2025 21:49
Copy link
Copy Markdown
Member

@nickelpro nickelpro left a comment

Choose a reason for hiding this comment

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

Same as infra, happy with this in principle. :shipit: when you're happy.

I don't generate exemplar releases so however you want to handle it is good with me. It's tricky-not-impossible to extract in the CI publishing job. Generally I say "don't screw it up" and create a dedicated release commit/tag which bumps the version number only. That commit and its message are the signal to CI to publish a release.

Problem
-------

When consuming this project as a package, consumers will receive
errors when executing `find_package(beman.exemplar)`. This is
because by default the required CMake files are not installed with
the package.

Solution
--------

Bump the version of the infra subdirectory to use a new release
of the `beman-install-library` CMake module that provides
support for `BEMAN_EXEMPLAR_INSTALL_CONFIG_FILE_PACKAGE`
and `BEMAN_INSTALL_CONFIG_FILE_PACKAGES` options.

This change is not anticipated to affect `FetchContent` or other
kinds of vendored workflows since installation of libraries is
primarily a packaging activity. Even in that case, it is
harmless to consumers to install CMake modules that are not used.

Also included in this change is improvements to the
`beman.exemplar` README to note the existence of the
`BEMAN_EXEMPLAR_INSTALL_CONFIG_FILE_PACKAGE` option.

Documentation in `README.md` was also updated to reflect the
new installation behavior for `cmake --workflow --preset [...]`
workflows.
@bretbrownjr bretbrownjr marked this pull request as ready for review September 10, 2025 10:34
@bretbrownjr bretbrownjr merged commit 69b712d into bemanproject:main Sep 10, 2025
86 checks passed
@bretbrownjr bretbrownjr deleted the better-defaults branch September 10, 2025 10:40
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.

4 participants