Skip to content
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

Optional prefix #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

BojanSof
Copy link

@BojanSof BojanSof commented Jan 14, 2024

Add ability to specify prefix for generated files and preprocessor definitions.
To specify prefix, set VERSION_PREFIX cmake variable, before invoking find_package(Version.cmake).

The idea for prefixing the generated files comes from project utilizing Zephyr RTOS. When one needs to include external library, the external library targets need to be linked with target zephyr_interface, special target which propagates compilation flags from Zephyr, but also adds a lot of paths to target include dirs. One such file is version.h, generated by Zephyr kernel build process, which is in 'conflict' with Version.cmake's Version.h. Although this was one specific problem (which may somehow be resolved by changing include dirs order), I think it is a good addition.

Prefixing of the preprocessor definitions may also address #3.

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.

None yet

1 participant