-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: force linkage of shared libraries (#1431)
This is brought by an issue that plagued pid_lut builds inside the container: https://eicweb.phy.anl.gov/EIC/benchmarks/physics_benchmarks/-/jobs/3070278#L1611 Our build process produces two shared objects: - A foo_plugin that incorporates src/foo/foo.cc (containing JANA2-related enty point) - A foo_library that contains all other *.cc files In order to have a complete set of symbols we ask linker to kindly link foo_library to foo_plugin. Unfortunately, it can ignore our request if it deems that the foo_library symbols are not referenced anywhere. This commit modifies the linking process to incorporate --no-as-needed option. The fancy feature from the https://gitlab.kitware.com/cmake/cmake/-/commit/42965799b4747ab1e0afa6546be13444f68c1987 makes it so that other libraries (e.g. external ones like podio) can still be linked lazily. At this point we can remove WITH_STATIC_LIBRARY per-plugin configuration. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
8f66e97
commit 01ef680
Showing
4 changed files
with
25 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters