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

[CMake] Macro replace dot with underscore for preprocessor defines #1701

Merged
merged 2 commits into from
Jan 12, 2021

Conversation

fredroy
Copy link
Contributor

@fredroy fredroy commented Jan 11, 2021

Modules for pluginization contain a dot (Sofa.GL, Sofa.Types, etc),
and custom macro (sofa_create_package_with_targets) generates preprocessor definitions according to the name.
So with the new modules name, the macro creates a preprocessor definition with a dot '.' , but this is not permitted by the C preprocessor.

So this PR replaces a '.' with a '_' for the generated definitions.
Fix #1695 (and seems to remove a warning generated by clang)


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy fredroy added pr: fix Fix a bug pr: fast merge Minor change that can be merged without waiting for the 7 review days NG2: pluginization See https://github.com/sofa-framework/sofa/issues/1527 pr: status wip Development in the pull-request is still in progress labels Jan 11, 2021
@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request and removed pr: status wip Development in the pull-request is still in progress labels Jan 11, 2021
@guparan
Copy link
Contributor

guparan commented Jan 11, 2021

Dot-to-underscore replacement had to be done earlier in the macro. Fixed it.
If CI is green then ready!

@guparan guparan merged commit d40992c into sofa-framework:master Jan 12, 2021
damienmarchal pushed a commit to CRIStAL-PADR/sofa that referenced this pull request Jan 13, 2021
…ofa-framework#1701)

* macro replace dot with underscore for preprocessor defines

* [SofaMacros] CLEAN dot-to-underscore order

Co-authored-by: Guillaume Paran <guillaume.paran@sofa-framework.org>
@guparan guparan added this to the v21.06 milestone Jan 18, 2021
@fredroy fredroy deleted the cmake_manage_dot branch January 27, 2021 16:13
@hugtalbot hugtalbot added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NG2: pluginization See https://github.com/sofa-framework/sofa/issues/1527 pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: fix Fix a bug pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle dots (.) in sofa_add_targets_to_package
3 participants