neuron: add variant for caliper (#23271)

This commit is contained in:
Itaru Kitayama 2021-04-29 17:03:30 +09:00 committed by GitHub
parent 15d2e60c16
commit 5b5c56c7f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,7 @@ class Neuron(CMakePackage):
variant("python", default=True, description="Enable python")
variant("rx3d", default=False, description="Enable cython translated 3-d rxd")
variant("tests", default=False, description="Enable unit tests")
variant("caliper", default=False, description="Add LLNL/Caliper support")
depends_on("bison", type="build")
depends_on("flex", type="build")
@ -43,6 +44,7 @@ class Neuron(CMakePackage):
depends_on("python@2.7:", when="+python")
depends_on("py-pytest", when="+python+tests")
depends_on("readline")
depends_on("caliper", when="+caliper")
conflicts("+rx3d", when="~python")
@ -80,6 +82,9 @@ def cmake_options(spec_options):
if "+legacy-unit" in spec:
args.append('-DNRN_DYNAMIC_UNITS_USE_LEGACY=ON')
if "+caliper" in spec:
args.append('-DCORENRN_CALIPER_PROFILING=ON')
return args
@run_after("install")