summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/heaptrack/package.py
blob: 7e1760cc237245cb132212e4fef3ae003416a0ac (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
# 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 import *


class Heaptrack(CMakePackage):
    """Heaptrack is a heap memory profiler that traces all memory allocations
    and annotates these events with stack traces.
    """

    homepage = "https://github.com/KDE/heaptrack"
    url      = "https://github.com/KDE/heaptrack/archive/v1.1.0.tar.gz"

    version('1.1.0', sha256='bd247ac67d1ecf023ec7e2a2888764bfc03e2f8b24876928ca6aa0cdb3a07309')

    depends_on('boost@1.41:')
    depends_on('cmake@2.8.9:', type='build')
    depends_on('elfutils')
    depends_on('libunwind')
    depends_on('zlib')
    depends_on('zstd')

    def cmake_args(self):

        spec = self.spec

        cmake_args = [
            "-DBOOST_ROOT={0}".format(spec['boost'].prefix),
            "-DBOOST_LIBRARY_DIR={0}".format(spec['boost'].prefix.lib),
            "-DBOOST_INCLUDE_DIR={0}".format(spec['boost'].prefix.include),
            "-DBOOST_NO_SYSTEM_PATHS:BOOL=ON",
            "-DBoost_NO_BOOST_CMAKE:BOOL=ON",
        ]
        return cmake_args