Skip to content
Snippets Groups Projects
Commit 0ef55b83 authored by Denis Davydov's avatar Denis Davydov Committed by Todd Gamblin
Browse files

dealii: fix config for Netcdf with lib64 (#2616)

parent a1a41bb4
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from spack import * from spack import *
import os
class Dealii(CMakePackage): class Dealii(CMakePackage):
...@@ -203,12 +204,22 @@ def cmake_args(self): ...@@ -203,12 +204,22 @@ def cmake_args(self):
# since Netcdf is spread among two, need to do it by hand: # since Netcdf is spread among two, need to do it by hand:
if '+netcdf' in spec: if '+netcdf' in spec:
# take care of lib64 vs lib installed lib locations:
if os.path.isdir(spec['netcdf-cxx'].prefix.lib):
netcdfcxx_lib_dir = spec['netcdf-cxx'].prefix.lib
else:
netcdfcxx_lib_dir = spec['netcdf-cxx'].prefix.lib64
if os.path.isdir(spec['netcdf'].prefix.lib):
netcdf_lib_dir = spec['netcdf'].prefix.lib
else:
netcdf_lib_dir = spec['netcdf'].prefix.lib64
options.extend([ options.extend([
'-DNETCDF_FOUND=true', '-DNETCDF_FOUND=true',
'-DNETCDF_LIBRARIES=%s;%s' % ( '-DNETCDF_LIBRARIES=%s;%s' % (
join_path(spec['netcdf-cxx'].prefix.lib, join_path(netcdfcxx_lib_dir,
'libnetcdf_c++.%s' % dso_suffix), 'libnetcdf_c++.%s' % dso_suffix),
join_path(spec['netcdf'].prefix.lib, join_path(netcdf_lib_dir,
'libnetcdf.%s' % dso_suffix)), 'libnetcdf.%s' % dso_suffix)),
'-DNETCDF_INCLUDE_DIRS=%s;%s' % ( '-DNETCDF_INCLUDE_DIRS=%s;%s' % (
spec['netcdf-cxx'].prefix.include, spec['netcdf-cxx'].prefix.include,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment