summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Malcolm Oxberry <goxberry@gmail.com>2018-01-16 03:29:00 -0800
committerscheibelp <scheibel1@llnl.gov>2018-01-19 13:44:36 -0800
commit48ae4c22b24d04ed4004dababde53d37c931adf7 (patch)
tree0062f0c673847cd40093591a6b45e91b960af954
parent8d2e340e16713658b5fdf7b5184fa3c10b79881b (diff)
downloadspack-48ae4c22b24d04ed4004dababde53d37c931adf7.tar.gz
spack-48ae4c22b24d04ed4004dababde53d37c931adf7.tar.bz2
spack-48ae4c22b24d04ed4004dababde53d37c931adf7.tar.xz
spack-48ae4c22b24d04ed4004dababde53d37c931adf7.zip
vtk@:6.1.0 : fix NetCDF C++ bindings detection
VTK 6.1.0 and earlier do not use paths stored in `NETCDF_CXX_ROOT` to detect the presence of NetCDF C++ headers and libraries. Consequently, VTK 6.1.0 does not build. This commit fixes this bug by setting the advanced variables `NETCDF_CXX_INCLUDE_DIR` and `NETCDF_CXX_LIBRARY` at the command line to specify the directory containing headers and the full library path for the NetCDF C++ bindings.
-rw-r--r--var/spack/repos/builtin/packages/vtk/package.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py
index f5b95108c9..bce6cc2475 100644
--- a/var/spack/repos/builtin/packages/vtk/package.py
+++ b/var/spack/repos/builtin/packages/vtk/package.py
@@ -103,4 +103,15 @@ class Vtk(CMakePackage):
'-DCMAKE_CXX_FLAGS=-DGLX_GLXEXT_LEGACY'
])
+ # VTK 6.1.0 (and possibly earlier) does not use
+ # NETCDF_CXX_ROOT to detect NetCDF C++ bindings, so
+ # NETCDF_CXX_INCLUDE_DIR and NETCDF_CXX_LIBRARY must be
+ # used instead to detect these bindings
+ netcdf_cxx_lib = spec['netcdf-cxx'].libs.joined()
+ cmake_args.extend([
+ '-DNETCDF_CXX_INCLUDE_DIR={0}'.format(
+ spec['netcdf-cxx'].prefix.include),
+ '-DNETCDF_CXX_LIBRARY={0}'.format(netcdf_cxx_lib),
+ ])
+
return cmake_args