diff options
author | Andres Freund | 2022-09-27 18:55:00 +0000 |
---|---|---|
committer | Andres Freund | 2022-09-29 01:48:19 +0000 |
commit | e3a892539b2baabc1963c31605728bbbc8f8b89a (patch) | |
tree | d050fd249257ae13ce83188573cc53aaf8e4ad2b | |
parent | 2beae72746e6b762cb335ec4fff87e5407b3096c (diff) |
meson: windows: Normalize slashes in prefix
This fixes a build issue on windows, when the prefix is set to a path with
forward slashes. Windows python defaults to a path with a backslash, but mingw
ucrt python defaults to a forward slash. This in turn lead to a wrong PATH set
during tests, causing tests to fail.
Reported-by: Melih Mutlu <m.melihmutlu@gmail.com>
Discussion: http://postgr.es/m/20220928022724.erzuk5v4ai4b53do@awork3.anarazel.de
-rw-r--r-- | meson.build | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 38b2c3aae2e..02c086c04e7 100644 --- a/meson.build +++ b/meson.build @@ -2733,15 +2733,15 @@ endif prefix = get_option('prefix') -test_prefix = prefix +test_prefix = fs.as_posix(prefix) if fs.is_absolute(get_option('prefix')) if host_system == 'windows' - if prefix.split(':\\').length() == 1 + if prefix.split(':/').length() == 1 # just a drive test_prefix = '' else - test_prefix = prefix.split(':\\')[1] + test_prefix = prefix.split(':/')[1] endif else assert(prefix.startswith('/')) |