summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/or-tools/package.py
blob: 0882c7eb7e8ebcf9833005b30a27942dc1810701 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)


from spack.package import *


class OrTools(CMakePackage):
    """This project hosts operations research tools developed at
    Google and made available as open source under the Apache 2.0
    License."""

    homepage = "https://developers.google.com/optimization/"
    url      = "https://github.com/google/or-tools/archive/v7.8.tar.gz"
    maintainers = ['hyoklee']

    version('7.8', sha256='d93a9502b18af51902abd130ff5f23768fcf47e266e6d1f34b3586387aa2de68')
    variant('coin', default=False, description='Enable COIN-OR solvers.')
    depends_on('cmake@3.14:', type='build')
    depends_on('gflags@2.2.2:')
    depends_on('glog@0.4.0:')
    depends_on('protobuf@3.12.2:')
    depends_on('abseil-cpp@20200225.2:')
    depends_on('cbc@2.10.5:')
    depends_on('cgl@0.60.3:')
    depends_on('clp@1.17.4:')
    depends_on('osi@0.108.6:')
    depends_on('coinutils@2.11.4:', when='+coin')

    def cmake_args(self):
        cmake_args = []
        cmake_args.append('-DBUILD_DEPS=OFF')
        cmake_args.append('-DBUILD_PYTHON=OFF')
        cmake_args.append(self.define_from_variant('USE_COINOR', 'coin'))
        cmake_args.append('-DUSE_SCIP=ON')
        cmake_args.append('-DBUILD_SCIP=ON')
        cmake_args.append('-DBUILD_TESTING=OFF')
        return cmake_args