summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/quantum-espresso/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/quantum-espresso/package.py')
-rw-r--r--var/spack/repos/builtin/packages/quantum-espresso/package.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/quantum-espresso/package.py b/var/spack/repos/builtin/packages/quantum-espresso/package.py
index 40c036320d..dacf771f60 100644
--- a/var/spack/repos/builtin/packages/quantum-espresso/package.py
+++ b/var/spack/repos/builtin/packages/quantum-espresso/package.py
@@ -227,13 +227,8 @@ class QuantumEspresso(CMakePackage, Package):
variant(
"gipaw",
default=False,
- when="build_system=generic",
description="Builds Gauge-Including Projector Augmented-Waves executable",
)
- with when("+gipaw"):
- conflicts(
- "@:6.3", msg="gipaw standard support available for QE 6.3 or grater version only"
- )
# Dependencies not affected by variants
depends_on("blas")
@@ -260,6 +255,15 @@ class QuantumEspresso(CMakePackage, Package):
# NOTE: *SOME* third-party patches will require deactivation of
# upstream patches using `~patch` variant
+ # gipaw
+ conflicts(
+ "@:6.2",
+ when="+gipaw",
+ msg="gipaw standard support available for QE 6.3 or grater version only",
+ )
+
+ conflicts("+gipaw build_system=cmake", when="@:7.1")
+
# Only CMake will work for @6.8: %aocc
conflicts(
"build_system=generic", when="@6.8: %aocc", msg="Please use CMake to build with AOCC"
@@ -400,6 +404,9 @@ class QuantumEspresso(CMakePackage, Package):
# extlibs_makefile updated to work with fujitsu compilers
patch("fj-fox.patch", when="+patch %fj")
+ # gipaw.x will only be installed with cmake if the qe-gipaw version is >= 5c4a4ce.
+ patch("gipaw-eccee44.patch", when="@7.2+gipaw build_system=cmake")
+
class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
def cmake_args(self):
@@ -416,6 +423,10 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
self.define_from_variant("QE_ENABLE_MPI_GPU_AWARE", "mpigpu"),
]
+ if "+gipaw" in spec:
+ cmake_args.append(self.define("QE_ENABLE_PLUGINS", "gipaw"))
+ cmake_args.append(self.define("QE_ENABLE_FOX", True))
+
if "+cuda" in self.spec:
cmake_args.append(self.define("QE_ENABLE_OPENACC", True))