ipopt: add debug variant (#9223)
This commit is contained in:
		 Geoffrey Oxberry
					Geoffrey Oxberry
				
			
				
					committed by
					
						 Todd Gamblin
						Todd Gamblin
					
				
			
			
				
	
			
			
			 Todd Gamblin
						Todd Gamblin
					
				
			
						parent
						
							a76aa36481
						
					
				
				
					commit
					69a9a3291a
				
			| @@ -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 @@ def configure_args(self): | ||||
|                 '--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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user