diff options
author | Simon Pintarelli <1237199+simonpintarelli@users.noreply.github.com> | 2022-08-23 13:24:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 13:24:32 +0200 |
commit | 44258a7ccead8df1132df9c206a26291051af939 (patch) | |
tree | 003709a02fab05b7f0099126650e63efb3490b47 | |
parent | 0f25d3b2192dd325c78c07cfd03bbdb114f15a00 (diff) | |
download | spack-44258a7ccead8df1132df9c206a26291051af939.tar.gz spack-44258a7ccead8df1132df9c206a26291051af939.tar.bz2 spack-44258a7ccead8df1132df9c206a26291051af939.tar.xz spack-44258a7ccead8df1132df9c206a26291051af939.zip |
meson: create unique names for build directory (#32062)
Taken from CMakePackage
-rw-r--r-- | lib/spack/spack/build_systems/meson.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/spack/spack/build_systems/meson.py b/lib/spack/spack/build_systems/meson.py index 886a7bee50..6f5f2d6cbb 100644 --- a/lib/spack/spack/build_systems/meson.py +++ b/lib/spack/spack/build_systems/meson.py @@ -139,12 +139,20 @@ class MesonPackage(PackageBase): setattr(self, "meson_flag_args", []) @property + def build_dirname(self): + """Returns the directory name to use when building the package + + :return: name of the subdirectory for building the package + """ + return "spack-build-%s" % self.spec.dag_hash(7) + + @property def build_directory(self): """Returns the directory to use when building the package :return: directory where to build the package """ - return os.path.join(self.stage.source_path, "spack-build") + return os.path.join(self.stage.path, self.build_dirname) def meson_args(self): """Produces a list containing all the arguments that must be passed to |