Set wrap_mode to None by default to know if user passed a value

pull/3769/head
Xavier Claessens 7 years ago
parent 55bbb3600f
commit 05cab3dee5
  1. 3
      mesonbuild/coredata.py
  2. 2
      mesonbuild/mesonmain.py

@ -19,6 +19,7 @@ from pathlib import PurePath
from collections import OrderedDict
from .mesonlib import MesonException
from .mesonlib import default_libdir, default_libexecdir, default_prefix
from .wrap import WrapMode
import ast
import argparse
@ -222,7 +223,7 @@ class CoreData:
self.base_options = {}
self.external_preprocess_args = {} # CPPFLAGS only
self.cross_file = self.__load_cross_file(options.cross_file)
self.wrap_mode = options.wrap_mode
self.wrap_mode = options.wrap_mode if options.wrap_mode is not None else WrapMode.default
self.compilers = OrderedDict()
self.cross_compilers = OrderedDict()
self.deps = OrderedDict()

@ -36,7 +36,7 @@ def create_parser():
p.add_argument('-v', '--version', action='version',
version=coredata.version)
# See the mesonlib.WrapMode enum for documentation
p.add_argument('--wrap-mode', default=WrapMode.default,
p.add_argument('--wrap-mode', default=None,
type=wrapmodetype, choices=WrapMode,
help='Special wrap mode to use')
p.add_argument('--profile-self', action='store_true', dest='profile',

Loading…
Cancel
Save