diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py
index dfa2c9e47aa36907330ff0b9d0ff697b2a9661c0..0f2970bb3eeea2e5fd63a71d100174cea4753f4b 100644
--- a/lib/spack/spack/build_systems/cmake.py
+++ b/lib/spack/spack/build_systems/cmake.py
@@ -314,7 +314,8 @@ def build_directory(self):
 
         :return: directory where to build the package
         """
-        return os.path.join(self.stage.path, 'spack-build')
+        dirname = 'spack-build=%s' % self.spec.dag_hash(7)
+        return os.path.join(self.stage.path, dirname)
 
     def cmake_args(self):
         """Produces a list containing all the arguments that must be passed to