Module: Mesa
Branch: master
Commit: f0cdc39b134dfc38f84b0f6dc1eaad86d28d4170
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0cdc39b134dfc38f84b0f6dc1eaad86d28d4170

Author: Eric Engestrom <eric.engest...@intel.com>
Date:   Tue May  8 16:40:24 2018 +0100

meson: remove dependency antipattern

`dep_valgrind != []` now (0.45) produces a warning that is quite explicit:
  WARNING: Trying to compare values of different types (DependencyHolder, list) 
using !=.
  The result of this is undefined and will become a hard error in a future 
Meson release.

`dep_valgrind = []` used to be the recommended way to deal with
non-existant dependency, but these don't work with `.found()`, so now
the recommended way is to declare a impossible dependency, which
null_dep does for us in Mesa.

In short, we don't need and shouldn't check for `!= []` anywhere anymore.

Reviewed-by: Dylan Baker <dy...@pnwbakers.com>
Signed-off-by: Eric Engestrom <eric.engest...@intel.com>

---

 src/compiler/glsl/glcpp/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/glsl/glcpp/meson.build 
b/src/compiler/glsl/glcpp/meson.build
index e6a3dc8675..09d44ddd68 100644
--- a/src/compiler/glsl/glcpp/meson.build
+++ b/src/compiler/glsl/glcpp/meson.build
@@ -57,7 +57,7 @@ glcpp = executable(
 
 if with_tests
   modes = ['unix', 'windows', 'oldmac', 'bizarro']
-  if dep_valgrind != [] and dep_valgrind.found()
+  if dep_valgrind.found()
     modes += ['valgrind']
   endif
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to