-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ew option to allow "example-common" project to not be included in build. #225
Conversation
Thanks for your PR. I would really like to see this as a |
I took another look and changed the code to:
Ideally, that first "ON" should be an "OFF", so if both the examples and tools were off the common project would also be off, but that would change the old behaviour. So, at the moment, people still need to explicitly disable example-common. Which do you think is the better default? |
Makes sense to only compile what's needed. |
…N if either tools or examples are included in the build, OFF otherwise.
Okay, I set it up as a dependent option that only includes example-common if either the tools or examples projects are included in the build. This produces a minimum set of projects in the solution if those options are disabled. |
EXCLUDE_FROM_ALL doesn't do this for you? |
Thanks, since I use visual studio for development, I can work around the issue with EXCLUDE_FROM_DEFAULT_BUILD instead, it's more or less the same option. Even with this, I still end up with an extra project in the solution that isn't needed. It's not a big deal, but it clutters searches and file opening with files that aren't in use in the project. |
I see what you mean. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and validated it doesn't cause problems
I added a new option
BGFX_BUILD_EXAMPLE_COMMON
to allow users to opt out of the example-common project from being added to their solutions. It defaults toOn
to match the default forBGFX_BUILD_EXAMPLES
which relies on it.I created a new option to allow users to continue to use
example-common
in their project without adding the rest of the examples and to preserve the existing behaviour.Fixes #224