diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py index b666a02a2d..018455c79b 100644 --- a/var/spack/repos/builtin/packages/ninja/package.py +++ b/var/spack/repos/builtin/packages/ninja/package.py @@ -35,8 +35,12 @@ class Ninja(Package): version("1.7.2", sha256="2edda0a5421ace3cf428309211270772dd35a91af60c96f93f90df6bc41b16d9") version("1.6.0", sha256="b43e88fb068fe4d92a3dfd9eb4d19755dae5c33415db2e9b7b61b4659009cde7") + variant( + "re2c", default=not sys.platform == "win32", description="Enable buidling Ninja with re2c" + ) + depends_on("python", type="build") - depends_on("re2c@0.11.3:", type="build") + depends_on("re2c@0.11.3:", type="build", when="+re2c") phases = ["configure", "install"]