Skip to content

Add support for building static library#394

Merged
scpeters merged 9 commits intogazebosim:masterfrom
joxoby:add_static_lib_support
Nov 23, 2020
Merged

Add support for building static library#394
scpeters merged 9 commits intogazebosim:masterfrom
joxoby:add_static_lib_support

Conversation

@joxoby
Copy link
Copy Markdown
Contributor

@joxoby joxoby commented Oct 19, 2020

As per title.

Signed-off-by: Juan Oxoby <juan@vicarious.com>
@joxoby joxoby force-pushed the add_static_lib_support branch from 1fcdaad to ebe9b20 Compare October 19, 2020 16:43
Comment thread cmake/SDFUtils.cmake Outdated
@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 <madebr@users.noreply.github.com>
Signed-off-by: Juan Oxoby <juan@vicarious.com>
@joxoby joxoby force-pushed the add_static_lib_support branch from 5c9a755 to 4c430aa Compare October 19, 2020 16:58
@codecov-io
Copy link
Copy Markdown

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
Copy Markdown
Contributor

@osrf-jenkins run tests please

Comment thread cmake/SDFUtils.cmake
Comment thread cmake/SDFUtils.cmake Outdated
Signed-off-by: Juan Oxoby <juan@vicarious.com>
@joxoby joxoby force-pushed the add_static_lib_support branch from a3e445b to be8028a Compare October 23, 2020 21:15
Comment thread include/sdf/system_util.hh Outdated
Signed-off-by: Juan Oxoby <juan@vicarious.com>
@joxoby joxoby force-pushed the add_static_lib_support branch from 49a7a14 to 4ec13df Compare October 25, 2020 17:35
Signed-off-by: Juan Oxoby <juan@vicarious.com>
@joxoby joxoby force-pushed the add_static_lib_support branch from db835a8 to 92a9813 Compare October 25, 2020 22:43
Comment thread include/sdf/system_util.hh Outdated
Comment on lines 30 to 34
#ifdef __GNUC__
#define SDFORMAT_VISIBLE __attribute__ ((dllexport))
#else
#define SDFORMAT_VISIBLE __declspec(dllexport)
#endif
Copy link
Copy Markdown
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
Copy Markdown
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>
@joxoby joxoby force-pushed the add_static_lib_support branch from 6279c31 to b5a8b1e Compare October 25, 2020 22:59
Copy link
Copy Markdown
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