summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriarspider <iarspider@gmail.com>2022-11-10 11:14:52 +0100
committerGitHub <noreply@github.com>2022-11-10 11:14:52 +0100
commitc1aec72f60d7d1b74c957636b85177bc6faf056a (patch)
tree79db89966886db9b81c146059e980f0dfcaaea4a
parentcfd0dc6d89dd54f2bbbbf053e73f9825d2f6319a (diff)
downloadspack-c1aec72f60d7d1b74c957636b85177bc6faf056a.tar.gz
spack-c1aec72f60d7d1b74c957636b85177bc6faf056a.tar.bz2
spack-c1aec72f60d7d1b74c957636b85177bc6faf056a.tar.xz
spack-c1aec72f60d7d1b74c957636b85177bc6faf056a.zip
cpu-features: Add variant to enable BUILD_SHARED_LIBS=True (#33809)
* Allow building shared libraries for cpu-features
-rw-r--r--var/spack/repos/builtin/packages/cpu-features/package.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cpu-features/package.py b/var/spack/repos/builtin/packages/cpu-features/package.py
index 35a0fecc75..37b607fa40 100644
--- a/var/spack/repos/builtin/packages/cpu-features/package.py
+++ b/var/spack/repos/builtin/packages/cpu-features/package.py
@@ -17,8 +17,11 @@ class CpuFeatures(CMakePackage):
version("0.7.0", tag="v0.7.0")
+ variant("shared", description="Build shared libraries", default=False)
+
depends_on("cmake@3.0.0:", type="build")
def cmake_args(self):
args = ["-DBUILD_TESTING:BOOL=OFF"]
+ args += self.enable_or_disable("BUILD_SHARED_LIBS", variant="shared")
return args