Commit f4a35a5c authored by PRUVOST Florent's avatar PRUVOST Florent

parsec: new variants cuda, mpi, debug

parent 5ea97e14
......@@ -16,19 +16,27 @@ class Parsec(CMakePackage):
version ('mfaverge', git='https://bitbucket.org/mfaverge/parsec.git', branch='mymaster')
variant('debug', default=False, description='Enable debug symbols')
variant('shared', default=True, description='Enable shared library')
variant('cuda', default=False, description='Enable CUDA support')
variant('mpi', default=False, description='Enable MPI support')
depends_on("cmake")
depends_on("hwloc@:1.999")
depends_on("mpi")
depends_on("hwloc")
depends_on("cuda", when='+cuda')
depends_on("mpi", when='+mpi')
def cmake_args(self):
spec = self.spec
if spec.satisfies('+shared'):
args = ["-DBUILD_SHARED_LIBS=ON"]
else:
args = ["-DBUILD_SHARED_LIBS=OFF"]
args = []
args.extend([
"-Wno-dev",
"-DCMAKE_BUILD_TYPE=%s " % ('Debug' if '+debug' in spec else 'Release'),
"-DBUILD_SHARED_LIBS=%s " % ('ON' if '+shared' in spec else 'OFF'),
"-DPARSEC_GPU_WITH_CUDA=%s " % ('ON' if '+cuda' in spec else 'OFF'),
"-DPARSEC_DIST_WITH_MPI=%s " % ('ON' if '+mpi' in spec else 'OFF')
])
return args
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment