-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Respect target type in ov_add_version_defines #22805
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
Respect target type in ov_add_version_defines #22805
Conversation
Object libraries are required for overcome limitation of |
Interesting, didn't test it with make, but Cmake accepts this implementation. The primary problem I hit with the original implementation is that it decides to use STATIC or OBJECT library based BUILD_SHARED_LIBS, but I must use STATIC for the plugin target in either case. |
Yes, it accepts. And then cmake generates Makefiles projects, which rebuild a lot lot files when product version is changed (while actually you can pull a single commit with changes in documentation)
Maybe you can extract target type using |
2162541
to
ff8e831
Compare
Yes, thought of the same. Repurposed this PR for such solution. |
ff8e831
to
6760d4b
Compare
build_jenkins |
build_jenkins |
Details:
Make ov_add_version_defines macro respect the original library type (instead of implicit assumption based on BUILD_SHARED_LIBS).
Note adding objects into a library with $<TARGET_OBJECTS:> does not work when mixing STATIC and OBJECT targets.