diff options
author | Benjamin Fovet <45510885+bfovet@users.noreply.github.com> | 2020-03-20 20:51:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-20 14:51:01 -0500 |
commit | d3fafaa868adee6cbeb3ec9ef011ff080cbd70f3 (patch) | |
tree | 9a929af2f733852fb6c9b0bbe9fbb9a26acb1050 | |
parent | c45644afaabb2415575d6bdf0b85f5e0c1f3380f (diff) | |
download | spack-d3fafaa868adee6cbeb3ec9ef011ff080cbd70f3.tar.gz spack-d3fafaa868adee6cbeb3ec9ef011ff080cbd70f3.tar.bz2 spack-d3fafaa868adee6cbeb3ec9ef011ff080cbd70f3.tar.xz spack-d3fafaa868adee6cbeb3ec9ef011ff080cbd70f3.zip |
Add Ceres Solver v1.14.0 with new variants (#15597)
* Add Ceres Solver version 1.14.0
* Add variants for Ceres Solver
-rw-r--r-- | var/spack/repos/builtin/packages/ceres-solver/package.py | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/ceres-solver/package.py b/var/spack/repos/builtin/packages/ceres-solver/package.py index 599c180121..ab84b4f9b7 100644 --- a/var/spack/repos/builtin/packages/ceres-solver/package.py +++ b/var/spack/repos/builtin/packages/ceres-solver/package.py @@ -17,19 +17,38 @@ class CeresSolver(CMakePackage): homepage = "http://ceres-solver.org" url = "http://ceres-solver.org/ceres-solver-1.12.0.tar.gz" + version('1.14.0', sha256='4744005fc3b902fed886ea418df70690caa8e2ff6b5a90f3dd88a3d291ef8e8e') version('1.12.0', sha256='745bfed55111e086954126b748eb9efe20e30be5b825c6dec3c525cf20afc895') + variant('suitesparse', default=False, description='Build with SuiteSparse') + variant('shared', default=True, description='Build shared libraries') + variant('examples', default=False, description='Build examples') + depends_on('eigen@3:') depends_on('lapack') depends_on('glog') def cmake_args(self): args = [ - '-DSUITESPARSE=OFF', '-DCXSPARSE=OFF', '-DEIGENSPARSE=ON', '-DLAPACK=ON', - '-DBUILD_SHARED_LIBS=ON', '-DSCHUR_SPECIALIZATIONS=OFF' ] + + if '+suitesparse' in self.spec: + args.append('-DSUITESPARSE=ON') + else: + args.append('-DSUITESPARSE=OFF') + + if '+shared' in self.spec: + args.append('-DBUILD_SHARED_LIBS=ON') + else: + args.append('-DBUILD_SHARED_LIBS=OFF') + + if '+examples' in self.spec: + args.append('-DBUILD_EXAMPLES=ON') + else: + args.append('-DBUILD_EXAMPLES=OFF') + return args |