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

ELEKTRA_PLUGIN_NAME #1042

Closed
markus2330 opened this issue Oct 22, 2016 · 9 comments
Closed

ELEKTRA_PLUGIN_NAME #1042

markus2330 opened this issue Oct 22, 2016 · 9 comments
Assignees

Comments

@markus2330
Copy link
Contributor

Build system should provide:

  • a string that contains the plugin/module name
  • a non-string variant of the plugin/module name

Then ELEKTRA_PLUGIN_EXPORT, ELEKTRA_PLUGIN_FUNCTION, ELEKTRA_README would have one paramter less.

@markus2330
Copy link
Contributor Author

@petermax2 Do you maybe want to implement this?

@petermax2
Copy link
Member

Yes, you can assign me if the implementation is not time critical. At the moment I have not so much spare time.

@markus2330
Copy link
Contributor Author

Thank you for working on this!

The actual reason to do this, is that every plugin has something like CRYPTO_PLUGIN_FUNCTION available and that CRYPTO_PLUGIN_FUNCTION is not needed anymore.

Btw. ARG_COMPILE_DEFINITIONS cannot be modified (due to restore_variable), so simply add further definitions in cmake/Modules/LibAddPlugin.cmake line 155 (where COMPILE_DEFINITIONS are defined).

@petermax2
Copy link
Member

Btw. ARG_COMPILE_DEFINITIONS cannot be modified (due to restore_variable), so simply add further definitions in cmake/Modules/LibAddPlugin.cmake line 155 (where COMPILE_DEFINITIONS are defined).

It works for "regular" plugins (without compilation variant), now I'm looking into plugin variants.

@markus2330
Copy link
Contributor Author

Great that you have progress!

petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 1, 2019
Provides ELEKTRA_PLUGIN_NAME and ELEKTRA_PLUGIN_NAME_C as compiler definitions via CMake.
See ElektraInitiative#1042 for details.
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 1, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 1, 2019
Provides ELEKTRA_PLUGIN_NAME and ELEKTRA_PLUGIN_NAME_C as compiler definitions via CMake.
See ElektraInitiative#1042 for details.
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 1, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 2, 2019
Provides ELEKTRA_PLUGIN_NAME and ELEKTRA_PLUGIN_NAME_C as compiler definitions via CMake.
See ElektraInitiative#1042 for details.
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 2, 2019
@petermax2
Copy link
Member

Progress so far

#2360 : The CMake module add_plugin provides the following compiler definitions for every plugin:

  • ELEKTRA_PLUGIN_NAME: the plugin name (including the variant if any) as string
  • ELEKTRA_PLUGIN_NAME_C: the plugin name without quotes, so it can be used to construct function names, that depend on the plugin name/variant.

The removal of unnecessary parameters of ELEKTRA_PLUGIN_FUNCTION and CRYPTO_PLUGIN_FUNCTION will be implemented in another PR.

petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 2, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 2, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 2, 2019
Provides ELEKTRA_PLUGIN_NAME and ELEKTRA_PLUGIN_NAME_C as compiler definitions via CMake.
See ElektraInitiative#1042 for details.
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 2, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 2, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 2, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 16, 2019
it is provided by the build system automatically.
See ElektraInitiative#1042 for further details.
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 17, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 17, 2019
@markus2330
Copy link
Contributor Author

So ELEKTRA_PLUGIN_EXPORT and ELEKTRA_README are the last left-overs?

@petermax2
Copy link
Member

So ELEKTRA_PLUGIN_EXPORT and ELEKTRA_README are the last left-overs?

Yes, should be very easy and straight-forward now that ELEKTRA_PLUGIN_FUNCTION works.

petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 17, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 17, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 17, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 17, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 17, 2019
petermax2 added a commit to petermax2/libelektra that referenced this issue Feb 17, 2019
@markus2330
Copy link
Contributor Author

We finally did it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants