diff options
-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 |