-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Meson equivalent to CMake's GenerateExportHeader generate_export_header
?
#11892
Comments
That would be that PR #10199 |
Neither of those two issues are related to the cmake module in question. But also, the cmake module in question takes several parameters to select the exact macro names used, and then it templates those into a statically determinable
Nothing is project-specific, and both checks in question can be better done via preprocessor macros. It's actually far more common for projects to do it that way:
In practice you don't care about SunPro C. Incidentally, as I recall cmake gets the "using non-Windows compilers and building statically" case incorrect. |
@eli-schwartz I suppose I could manually write out that header file with all the different targets I care about, which in my case is:
Linux, macOS, *BSD, SunOS:
My main fear is that I don't cover enough platforms so that when CMake gets a contrib, e.g., for LCC, I don't automatically gain support for their visibility syntax. |
I would not worry about that since the cmake module is approximately as stable as a thing that never changes. Also because unix compilers have more or less converged on the GNU syntax (e.g. sunpro supports both now) and all Windows compilers support the MSVC syntax for compatibility (and because if you're going to compile code with a Windows compiler and then include its headers from an MSVC cl.exe project, you must support whatever cl.exe supports). |
Ok it's a little verbose but I created this by merging the generated header from MSVC and gcc (Linux), and your SunPro C hint: https://github.com/SamuelMarks/cmocka/blob/msvc2005/pregen/cmocka_export.h Not sure if it'd still be a good idea for meson to support this… |
Relevant:
What's the equivalent of this in Meson?
The text was updated successfully, but these errors were encountered: