dealii: fix config for Netcdf with lib64 (#2616)
This commit is contained in:
parent
a1a41bb4c7
commit
0ef55b831f
1 changed files with 13 additions and 2 deletions
|
@ -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):
|
||||||
|
|
||||||
# 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,
|
||||||
|
|
Loading…
Reference in a new issue