diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/cmake/package.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 9e8af3d2b7..8b3b42932b 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -5,6 +5,8 @@ import re +import spack.build_environment + class Cmake(Package): """A cross-platform, open-source build system. CMake is a family of @@ -277,6 +279,17 @@ class Cmake(Package): if '+ownlibs' in spec: args.append('-DCMAKE_USE_OPENSSL=%s' % str('+openssl' in spec)) + args.append('-DBUILD_CursesDialog=%s' % str('+ncurses' in spec)) + + # Make CMake find its own dependencies. + rpaths = spack.build_environment.get_rpaths(self) + prefixes = spack.build_environment.get_cmake_prefix_path(self) + args.extend([ + '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF', + '-DCMAKE_INSTALL_RPATH={0}'.format(";".join(str(v) for v in rpaths)), + '-DCMAKE_PREFIX_PATH={0}'.format(";".join(str(v) for v in prefixes)) + ]) + return args def bootstrap(self, spec, prefix): |