summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/semiprof/package.py
blob: a9f3e808d15124a5ac283d7df8945d2840ae890e (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
# Copyright 2013-2023 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 Semiprof(CMakePackage):
    """Simple thread safe annotation based C++ profiler."""

    homepage = "https://github.com/bcumming/semiprof"
    url = "https://github.com/bcumming/semiprof/archive/refs/tags/v0.1.tar.gz"

    maintainers("simonpintarelli")

    variant("examples", default=False, description="Enable examples")
    variant("shared", default=True, description="Build shared libraries")

    license("BSD-3-Clause")

    version("0.1", sha256="4fb3823c65a4f5dfbe05e8cbe1911dfd25cd7740597f82c7b3a84472de26f0dc")

    def cmake_args(self):
        return [
            self.define("SEMIPROF_WITH_INSTALL", True),
            self.define_from_variant("SEMIPROF_WITH_EXAMPLES", "examples"),
            self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
        ]