From 69a9a3291af5889e50c0300622da39601eb11a63 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Fri, 14 Sep 2018 15:53:25 -0700 Subject: ipopt: add debug variant (#9223) --- var/spack/repos/builtin/packages/ipopt/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/ipopt/package.py b/var/spack/repos/builtin/packages/ipopt/package.py index 2b92d958ed..33a818bd89 100644 --- a/var/spack/repos/builtin/packages/ipopt/package.py +++ b/var/spack/repos/builtin/packages/ipopt/package.py @@ -47,6 +47,8 @@ class Ipopt(AutotoolsPackage): description="Build with Coin Harwell Subroutine Libraries") variant('metis', default=False, description="Build with METIS partitioning support") + variant('debug', default=False, + description="Build debug instead of optimized version") depends_on("blas") depends_on("lapack") @@ -100,4 +102,12 @@ class Ipopt(AutotoolsPackage): '--with-metis-lib=%s' % spec['metis'].libs.ld_flags, '--with-metis-incdir=%s' % spec['metis'].prefix.include]) + # The IPOPT configure file states that '--enable-debug' implies + # '--disable-shared', but adding '--enable-shared' overrides + # '--disable-shared' and builds a shared library with debug symbols + if '+debug' in spec: + args.append('--enable-debug') + else: + args.append('--disable-debug') + return args -- cgit v1.2.3-60-g2f50