2018-10-08 04:52:23 +08:00
|
|
|
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
|
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2016-10-06 01:03:05 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2016-10-06 01:03:05 +08:00
|
|
|
from spack import *
|
|
|
|
|
|
|
|
|
|
|
|
class Everytrace(CMakePackage):
|
|
|
|
"""Get stack trace EVERY time a program exits."""
|
|
|
|
|
|
|
|
homepage = "https://github.com/citibeth/everytrace"
|
2018-07-23 15:00:15 +08:00
|
|
|
url = "https://github.com/citibeth/everytrace/archive/0.2.2.tar.gz"
|
|
|
|
git = "https://github.com/citibeth/everytrace.git"
|
2016-10-06 01:03:05 +08:00
|
|
|
|
2018-05-04 06:00:21 +08:00
|
|
|
maintainers = ['citibeth']
|
|
|
|
|
2018-07-23 15:00:15 +08:00
|
|
|
version('develop', branch='develop')
|
2018-05-04 06:00:21 +08:00
|
|
|
version('0.2.2', 'dd60b8bf68cbf3dc2be305a040f2fe3e')
|
2016-10-06 01:03:05 +08:00
|
|
|
|
|
|
|
variant('mpi', default=True, description='Enables MPI parallelism')
|
|
|
|
variant('fortran', default=True,
|
|
|
|
description='Enable use with Fortran programs')
|
2018-05-04 06:00:21 +08:00
|
|
|
variant('cxx', default=True, description='Enable C++ Exception-based features')
|
2016-10-06 01:03:05 +08:00
|
|
|
|
|
|
|
depends_on('mpi', when='+mpi')
|
|
|
|
|
2016-11-05 01:57:53 +08:00
|
|
|
def cmake_args(self):
|
2016-10-06 01:03:05 +08:00
|
|
|
spec = self.spec
|
|
|
|
return [
|
|
|
|
'-DUSE_MPI=%s' % ('YES' if '+mpi' in spec else 'NO'),
|
2018-05-04 06:00:21 +08:00
|
|
|
'-DUSE_FORTRAN=%s' % ('YES' if '+fortran' in spec else 'NO'),
|
|
|
|
'-DUSE_CXX=%s' % ('YES' if '+cxx' in spec else 'NO')]
|
2016-10-06 01:03:05 +08:00
|
|
|
|
2017-03-15 13:26:44 +08:00
|
|
|
def setup_environment(self, spack_env, run_env):
|
|
|
|
run_env.prepend_path('PATH', join_path(self.prefix, 'bin'))
|