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

MOCKABLE_FUNCTION ->header ->code #242

Open
anporumb opened this issue Dec 28, 2021 · 0 comments
Open

MOCKABLE_FUNCTION ->header ->code #242

anporumb opened this issue Dec 28, 2021 · 0 comments

Comments

@anporumb
Copy link
Contributor

Right now the behavior or MOCKABLE_FUNCTION is that between #define ENABLE_MOCKS / #undef ENABLE_MOCKS will generate code.

This improvement wants to have MOCKABLE_FUNCTION generate SEPARATE "proper declarations for a header" and "proper definitions for a source file", possibly based on some more #defines, suggestions would be along the lines of ENABLE_HEADER_MOCKS / ENABLE_SOURCE_MOCKS.

This will greatly reduce compilation time, as the "source file" would only need be compiled once (and then used as object). This would also allow use of precompiled headers (maybe), but would greatly reduce our huge compilation times as we'd have a c_util_mocks library that would be compiled/linked once and re-used everywhere where any component of it would be used.

Best Regards,
Andrei Porumb

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

No branches or pull requests

1 participant