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.

@joxoby joxoby force-pushed the add_static_lib_support branch from 1fcdaad to ebe9b20 Compare October 19, 2020 16:43
cmake/SDFUtils.cmake Outdated Show resolved Hide resolved
@joxoby joxoby force-pushed the add_static_lib_support branch from 77ea275 to 5c9a755 Compare October 19, 2020 16:53
Co-authored-by: Anonymous Maarten <[email protected]>
Signed-off-by: Juan Oxoby <[email protected]>
@joxoby joxoby force-pushed the add_static_lib_support branch from 5c9a755 to 4c430aa Compare October 19, 2020 16:58
@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
@joxoby joxoby force-pushed the add_static_lib_support branch from a3e445b to be8028a Compare October 23, 2020 21:15
include/sdf/system_util.hh Outdated Show resolved Hide resolved
Signed-off-by: Juan Oxoby <[email protected]>
@joxoby joxoby force-pushed the add_static_lib_support branch from 49a7a14 to 4ec13df Compare October 25, 2020 17:35
@joxoby joxoby force-pushed the add_static_lib_support branch from db835a8 to 92a9813 Compare October 25, 2020 22:43
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 <[email protected]>
@joxoby joxoby force-pushed the add_static_lib_support branch from 6279c31 to b5a8b1e Compare October 25, 2020 22:59
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 <[email protected]>
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 <[email protected]>
@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 <[email protected]>
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