[libsoup] meson: Take advantage of short-circuit evaluation



commit 46e17ef751add2003171579e982598104881d893
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Fri Apr 13 15:56:28 2018 +0200

    meson: Take advantage of short-circuit evaluation
    
    Both `enable_gnome` and `enable_introspection` can take advantage
    of short-circuit evaluation to reduce meson parsing.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795233

 meson.build |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/meson.build b/meson.build
index 1de92d7..5b71022 100644
--- a/meson.build
+++ b/meson.build
@@ -207,18 +207,12 @@ endif
 #################
 # GNOME support #
 #################
-enable_gnome = get_option('gnome')
-if host_machine.system() == 'windows'
-  enable_gnome = false
-endif
+enable_gnome = get_option('gnome') and host_machine.system() != 'windows'
 
 #########################
 # GObject introspection #
 #########################
-enable_introspection = get_option('introspection')
-if enable_introspection
-  enable_introspection = find_program('g-ir-scanner', required: false).found() and not meson.is_cross_build()
-endif
+enable_introspection = get_option('introspection') and find_program('g-ir-scanner', required: false).found() 
and not meson.is_cross_build()
 
 ############
 # Vala API #


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]