From 3cd2cee7756b462a4d5fb72373ebc7e4ced71e4f Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 25 Apr 2024 15:35:28 -0700 Subject: [PATCH] dependencies/openmp: use mlog.warning instead of open coding It was probably done this way originally since we didn't have the `fatal` keyword argument to avoid triggering the fatal-meson-warnings. While we're here, replace the use of a `if bool` with an `else` on the for loop. --- mesonbuild/dependencies/misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index 68c379233..f9a2e047a 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -139,8 +139,8 @@ class OpenMPDependency(SystemDependency): if self.clib_compiler.has_header(name, '', self.env, dependencies=[self], disable_cache=True)[0]: self.is_found = True break - if not self.is_found: - mlog.log(mlog.yellow('WARNING:'), 'OpenMP found but omp.h missing.') + else: + mlog.warning('OpenMP found but omp.h missing.', fatal=False) packages['openmp'] = OpenMPDependency