From 5882e83590c3396b44e309d9332acf63a157f69d Mon Sep 17 00:00:00 2001 From: Zephyr Lykos Date: Sat, 6 Dec 2025 22:04:48 +0800 Subject: compilers/nvidia_hpc: compilers: move -std options to get_option_std_args Fixes: 6c88d9992192379511c4777c526786cbacf06167 Fixes: d3542ff690d0be723cfd3ebfaaac99290517837f Fixes: ff0c758b2a8015f7e7ca6fc627c29ef7bb4771b3 --- mesonbuild/compilers/cpp.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index bdf60f6c2..5ed4aea81 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -572,6 +572,14 @@ class NvidiaHPC_CPPCompiler(PGICompiler, CPPCompiler): std_opt.set_versions(cppstd_choices) return opts + def get_option_std_args(self, target: BuildTarget, subproject: T.Optional[str] = None) -> T.List[str]: + args: T.List[str] = [] + std = self.get_compileropt_value('std', target, subproject) + assert isinstance(std, str) + if std != 'none': + args.append(self._find_best_cpp_std(std)) + return args + class ElbrusCPPCompiler(ElbrusCompiler, CPPCompiler): def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice, -- cgit v1.2.3