Skip to content

has shared link option #98

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

Closed
wants to merge 1 commit into from
Closed

has shared link option #98

wants to merge 1 commit into from

Conversation

klemens-morgenstern
Copy link
Contributor

Closes #93.

@@ -34,6 +34,16 @@ project(
#set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO ON CACHE STRING "")

option(MRDOX_BUILD_TESTS "Build tests" ON)
option(MRDOX_BUILD_SHARED "Link shared" OFF)

if (MRDOX_BUILD_SHARED)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this how its usually done with cmake? I mean, is there not some kind of standard switch or something?

@vinniefalco
Copy link
Member

I think maybe I did not write the issue up correctly... MrDox has to have a plugin system (i.e. load DLLs / shared libraries dynamically at runtime) so that people can author their own generators without having to build MrDox (and LLVM with it). Or at the least so they don't need to fork the program.

For this to work they need to be able to call in to MrDox functions and I am assuming this has to happen via shared linking...

@klemens-morgenstern
Copy link
Contributor Author

That's a different issue altogether I think. I'll look into it.

@klemens-morgenstern
Copy link
Contributor Author

#58 is the one.

@vinniefalco
Copy link
Member

That's a different issue altogether I think. I'll look into it.

Yes, building the plugin architecture is a issue number 58, but this issue is about setting up the build system for it (and having it tested). Most of this pull request looks useful; we need those macros properly set for non-windows platforms, and we need the switches in the CML..

When mrdox is installed from a package the tool should come as a single executable not as an executable with main plus the mrdox-api as a shared DLL. But it should still have exports or whatever, so it can load the plugins at runtime, and so those plugins can import from the executable and call into mrdox.

For the tests, who cares. Maybe we should make the mrdox-test link to mrdox dynamically so that CI can test it?

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.

Build options for shared library
2 participants