From a084032c59668108e9eaf05c1f6a1c66dcfbe8a2 Mon Sep 17 00:00:00 2001 From: Jacob Boerema Date: Sat, 22 Aug 2020 14:35:43 -0400 Subject: [PATCH] build: (meson) fix CC_VERSION contains backslashes on Windows. This caused an invalid specifier warning in gimp-version.c and an incorrect value of COLLECT_GCC reported by gimp -v. --- meson.build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meson.build b/meson.build index e20ca7d30f..a4958d2ec3 100644 --- a/meson.build +++ b/meson.build @@ -1406,6 +1406,11 @@ if cc_version == '' # compiler. Just save its name and version. cc_version = cc.get_id() + ' ' + cc.version() else + if platform_windows + # On Windows the CC_VERSION string can contain backslashes in paths, + # specifically in COLLECT_GCC. Replace by slashes. + cc_version = '/'.join(cc_version.split('\\')) + endif # See also: https://github.com/mesonbuild/meson/pull/6179 cc_version = '\\n'.join(cc_version.split('\n')) endif