Skip to content

Conversation

Scrumplex
Copy link
Contributor

What does this change do?

This change installs built examples as binaries.
This might be useful for distribution packagers to provide these example programs in their packages.

Is it related to an existing bug report or feature request?

N/A

Pre-merge checklist

  • I've read CONTRIBUTING.md
  • I've rebased my changes against the current HEAD of origin/master (if necessary)
  • I've added new test cases to verify my change
  • I've regenerated toml.hpp (how-to)
  • I've updated any affected documentation
  • I've rebuilt and run the tests with at least one of:
    • Clang 8 or higher
    • GCC 8 or higher
    • MSVC 19.20 (Visual Studio 2019) or higher
  • I've added my name to the list of contributors in README.md

This might be useful for distribution packagers to provide example programs in their packages.

Signed-off-by: Sefa Eyeoglu <[email protected]>
@marzer
Copy link
Owner

marzer commented Sep 1, 2024

Hmmmn, I think this should also have an option to control it, and be off by default. I know I personally have never wanted the INSTALL target of a project to install examples/demos/tests, et cetera, when I was doing a system build; I imagine many others are the same.

@Scrumplex
Copy link
Contributor Author

I would argue that setting -Dbuild_examples=true would only make sense in the context of a system build if those examples are also installed. Otherwise, it doesn't really make much sense to build those examples when your intent is to package the software for a system build.

@marzer
Copy link
Owner

marzer commented Sep 1, 2024

I don't want example binaries to install by default. This is standard practice.

would only make sense in the context of a system build if those examples are also installed

I'm saying people shouldn't be surprised by unexpected example binaries being installed if they try to install the lib system-wide, and it appears your change would cause that.

Never mind, see below 😅

@marzer
Copy link
Owner

marzer commented Sep 1, 2024

Oh, wait a minute, I get what you're saying now. People have to opt-in to building the examples to begin with, heh. Sorry, brain-fart. Yeah this makes sense.

@Scrumplex Scrumplex marked this pull request as draft September 1, 2024 19:13
@Scrumplex Scrumplex force-pushed the feat/install-examples branch from 8128eb6 to 8a135bf Compare September 1, 2024 19:14
@Scrumplex
Copy link
Contributor Author

Scrumplex commented Sep 1, 2024

Oh, I didn't see your comment before pushing. Lemme reset back ^^

Edit: Note to self: Check PR comments before running gh pr ready --undo ^^

@Scrumplex Scrumplex force-pushed the feat/install-examples branch from 8a135bf to 8128eb6 Compare September 1, 2024 19:15
@Scrumplex Scrumplex marked this pull request as ready for review September 1, 2024 19:15
@marzer marzer merged commit 51e3475 into marzer:master Sep 1, 2024
16 checks passed
@marzer
Copy link
Owner

marzer commented Sep 1, 2024

🎉 cheers :)

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