Commits

Jed Brown  committed ea5fab5

ExodusII: link Fortran if and only if using Fortran

  • Participants
  • Parent commits bf7cd47

Comments (0)

Files changed (1)

File config/BuildSystem/config/packages/exodusii.py

     config.package.Package.__init__(self, framework)
     self.download   = ['http://ftp.mcs.anl.gov/pub/petsc/externalpackages/exodus-5.24.tar.bz2']
     self.downloadfilename = 'exodus'
-    self.liblist    = [['libexoIIv2for.a', 'libexodus.a'], ['libexoIIv2for.a', 'libexoIIv2c.a'], ['libexoIIv2c.a']]
     self.functions  = ['ex_close']
     self.includes   = ['exodusII.h']
     self.includedir = ['include']
     self.deps   = [self.netcdf, self.hdf5]
     return
 
+  def configureLibrary(self):
+    self.liblist = [['libexodus.a'], ['libexoIIv2c.a']]
+    if hasattr(self.compilers, 'FC'):
+      self.liblist = [['libexoIIv2for.a'] + libs for libs in self.liblist]
+      self.functions.append(self.compilers.mangleFortranFunction('exclos'))
+    config.package.Package.configureLibrary(self)
+
   def Install(self):
     self.logPrintBox('Compiling ExodusII; this may take several minutes')
     import os