Skip to content

cpr: add pic and shared variants #13

@prudhomm

Description

@prudhomm

Summary

This issue proposes adding two new variants, +pic and +shared, to the cpr package in Spack:

  • +pic: Enables building position-independent code (PIC) for static libraries, useful for linking into shared libraries.
  • +shared: Controls whether to build cpr as a shared or static library.

Rationale

  1. Position-Independent Code (+pic): Building position-independent code (PIC) is essential for linking static libraries into shared libraries. Currently, cpr only builds static libraries, which restricts its usability in applications that need to link with PIC-compatible code. By adding a +pic variant, users have the option to enable PIC, improving cpr’s compatibility with larger projects and shared library requirements.
  2. Shared Libraries (+shared): The default static library build limits flexibility, as many projects require shared libraries to manage memory and dependencies more effectively. Adding a +shared variant allows users to choose between static and shared library builds, making cpr more versatile and better suited for dynamic linking needs in complex projects.

Description

No response

Additional information

No response

General information

  • I have searched the issues of this repo and believe this is not a duplicate

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions