diff options
author | Christophe Prud'homme <christophe.prudhomme@feelpp.org> | 2024-11-04 10:00:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-04 10:00:26 +0100 |
commit | f05033b0d2fdec1a3d91fb73e779862d65e6ac55 (patch) | |
tree | b6a4b06a9faac7e12d9e350261e65e12cfb00639 /var | |
parent | d63f06e4b7e991703064cbd02748f16e3c7289f3 (diff) | |
download | spack-f05033b0d2fdec1a3d91fb73e779862d65e6ac55.tar.gz spack-f05033b0d2fdec1a3d91fb73e779862d65e6ac55.tar.bz2 spack-f05033b0d2fdec1a3d91fb73e779862d65e6ac55.tar.xz spack-f05033b0d2fdec1a3d91fb73e779862d65e6ac55.zip |
cpr: add +pic and +shared variants (#47281)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/cpr/package.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cpr/package.py b/var/spack/repos/builtin/packages/cpr/package.py index 07a38e0015..0f6daf03e4 100644 --- a/var/spack/repos/builtin/packages/cpr/package.py +++ b/var/spack/repos/builtin/packages/cpr/package.py @@ -20,6 +20,9 @@ class Cpr(CMakePackage): version("1.10.4", sha256="88462d059cd3df22c4d39ae04483ed50dfd2c808b3effddb65ac3b9aa60b542d") version("1.9.2", sha256="3bfbffb22c51f322780d10d3ca8f79424190d7ac4b5ad6ad896de08dbd06bf31") + variant("pic", default=True, description="Position independent code") + variant("shared", default=True, description="Build shared library") + depends_on("cxx", type="build") depends_on("curl") @@ -32,4 +35,6 @@ class Cpr(CMakePackage): self.define("CPR_USE_SYSTEM_GTEST", True), self.define(f"CPR{_force}_USE_SYSTEM_CURL", True), self.define("CPR_ENABLE_SSL", True), + self.define_from_variant("BUILD_SHARED_LIBS", "shared"), + self.define_from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), ] |