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

Add support for building static library #394

Merged
merged 9 commits into from
Nov 23, 2020

Conversation

joxoby
Copy link
Contributor

@joxoby joxoby commented Oct 19, 2020

As per title.

Signed-off-by: Juan Oxoby <juan@vicarious.com>
cmake/SDFUtils.cmake Outdated Show resolved Hide resolved
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Signed-off-by: Juan Oxoby <juan@vicarious.com>
@codecov-io
Copy link

codecov-io commented Oct 19, 2020

Codecov Report

Merging #394 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #394   +/-   ##
=======================================
  Coverage   87.38%   87.38%           
=======================================
  Files          60       60           
  Lines        9341     9341           
=======================================
  Hits         8163     8163           
  Misses       1178     1178           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 144f82c...b5a8b1e. Read the comment docs.

@j-rivero
Copy link
Contributor

@osrf-jenkins run tests please

cmake/SDFUtils.cmake Outdated Show resolved Hide resolved
Signed-off-by: Juan Oxoby <juan@vicarious.com>
include/sdf/system_util.hh Outdated Show resolved Hide resolved
Signed-off-by: Juan Oxoby <juan@vicarious.com>
Signed-off-by: Juan Oxoby <juan@vicarious.com>
Comment on lines 30 to 34
#ifdef __GNUC__
#define SDFORMAT_VISIBLE __attribute__ ((dllexport))
#else
#define SDFORMAT_VISIBLE __declspec(dllexport)
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

mingw supports __declspec(dllexport) and __declspec(dllimport)
See http://www.mingw.org/wiki/exporting_a_class_from_a_dll_for_multiple_instantiations

A special case for __GNUC__ is not needed, imho.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense

Signed-off-by: Juan Oxoby <juan@vicarious.com>
Copy link
Contributor

@madebr madebr left a comment

Choose a reason for hiding this comment

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

LGTM!

@mjcarroll mjcarroll self-requested a review November 9, 2020 18:55
@scpeters scpeters merged commit a42103e into gazebosim:master Nov 23, 2020
scpeters added a commit to scpeters/ign-cmake that referenced this pull request Dec 29, 2021
Port of gazebosim/sdformat#394 to ign-cmake2.
This publicly defines the *_STATIC_DEFINE symbol for
a library target if BUILD_SHARED_LIBS is Off.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
scpeters added a commit to scpeters/sdformat that referenced this pull request Dec 29, 2021
Restore functionality of gazebosim#394. Submitted a fix upstream
in gazebosim/gz-cmake#203.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters scpeters mentioned this pull request Dec 29, 2021
scpeters added a commit to scpeters/sdformat that referenced this pull request Dec 29, 2021
Restore functionality of gazebosim#394. Submitted a fix upstream
in gazebosim/gz-cmake#203.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
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.

8 participants