From f790ce0f72b973a37f34563fecf072f0b55cb4db Mon Sep 17 00:00:00 2001 From: "John W. Parent" <45471568+johnwparent@users.noreply.github.com> Date: Thu, 6 Feb 2025 20:55:57 -0500 Subject: [PATCH] icu4c: no cxxstd flag option on Windows (#48510) * ICU4C: Don't reference a spec variant on a platform on which it's not defined * icu4c: no cxx flag on Windows --- var/spack/repos/builtin/packages/icu4c/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/icu4c/package.py b/var/spack/repos/builtin/packages/icu4c/package.py index 7f8f02e4808..3766bca23fd 100644 --- a/var/spack/repos/builtin/packages/icu4c/package.py +++ b/var/spack/repos/builtin/packages/icu4c/package.py @@ -72,7 +72,7 @@ def url_for_version(self, version): return url.format(version.dashed, version.underscored) def flag_handler(self, name, flags): - if name == "cxxflags": + if name == "cxxflags" and not self.spec.platform == "windows": # Control of the C++ Standard is via adding the required "-std" # flag to CXXFLAGS in env flags.append(getattr(self.compiler, f"cxx{self.spec.variants['cxxstd'].value}_flag")) @@ -125,7 +125,7 @@ def msbuild_args(self): @property def build_directory(self): solution_path = pathlib.Path(self.pkg.stage.source_path) - if self.spec.satsifies("@:67"): + if self.spec.satisfies("@:67"): solution_path = solution_path / "icu" solution_path = solution_path / "source" / "allinone" return str(solution_path)