diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py index d7da957a9d6..dfa2c9e47aa 100644 --- a/lib/spack/spack/build_systems/cmake.py +++ b/lib/spack/spack/build_systems/cmake.py @@ -331,9 +331,9 @@ def cmake_args(self): def cmake(self, spec, prefix): """Runs ``cmake`` in the build directory""" - options = [os.path.abspath(self.root_cmakelists_dir)] - options += self.std_cmake_args + options = self.std_cmake_args options += self.cmake_args() + options.append(os.path.abspath(self.root_cmakelists_dir)) with working_dir(self.build_directory, create=True): inspect.getmodule(self).cmake(*options)