diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2025-02-20 14:05:05 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-02-20 23:10:17 +0200 |
| commit | d995cbce0f1e9454fdfe467e47c2423aa5217fd3 (patch) | |
| tree | a88be1aa99b92fc89988c4d0bedb246d990e4b72 | |
| parent | df79a515715ab5af963ba26376601b3bfff30a43 (diff) | |
| download | meson-d995cbce0f1e9454fdfe467e47c2423aa5217fd3.tar.gz | |
Fix reconfiguration on --wipe.
Closes #14279.
| -rw-r--r-- | mesonbuild/options.py | 5 | ||||
| -rw-r--r-- | unittests/allplatformstests.py | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/mesonbuild/options.py b/mesonbuild/options.py index 7c22332ea..838ccb794 100644 --- a/mesonbuild/options.py +++ b/mesonbuild/options.py @@ -1305,7 +1305,7 @@ class OptionStore: # A) a system option in which case the subproject is None # B) a project option, in which case the subproject is '' (this method is only called from top level) # - # The key parsing fucntion can not handle the difference between the two + # The key parsing function can not handle the difference between the two # and defaults to A. assert isinstance(keystr, str) key = OptionKey.from_string(keystr) @@ -1350,8 +1350,7 @@ class OptionStore: # # Some base options (sanitizers etc) might get added later. # Permitting them all is not strictly correct. - assert isinstance(keystr, str) - if ':' not in keystr and not self.is_compiler_option(key) and not self.is_base_option(key): + if not self.is_compiler_option(key) and not self.is_base_option(key): raise MesonException(f'Unknown options: "{keystr}"') self.pending_project_options[key] = valstr else: diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 865b5e34e..634a860ad 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -5143,3 +5143,8 @@ class AllPlatformTests(BasePlatformTests): testdir = os.path.join(self.unit_test_dir, '117 empty project') args = ['-Db_ndebug=if_release'] self.init(testdir, extra_args=args) + + def test_wipe_with_args(self): + testdir = os.path.join(self.common_test_dir, '1 trivial') + self.init(testdir, extra_args=['-Dc_args=-DSOMETHING']) + self.init(testdir, extra_args=['--wipe']) |
