Skip to content

fix: write a meson build file with a forward slash separator - #305

Merged
jdhughes-dev merged 1 commit into
developfrom
meson-path-separators
Aug 10, 2026
Merged

fix: write a meson build file with a forward slash separator#305
jdhughes-dev merged 1 commit into
developfrom
meson-path-separators

Conversation

@jdhughes-dev

Copy link
Copy Markdown
Collaborator

A meson build file is read as text, so a Windows separator starts an escape sequence. The source directory written for mt3dms became a tab, temp\mt3dms-2.0 followed by a tab and rue-binary, the one for vs2dt became a vertical tab, and the one for gridgen became a backspace, reported by meson as Include dir temp\srcasic does not exist. None of the three built with meson on Windows. triangle built because a backslash followed by an s is not an escape, which is why it is the one of the four that already worked.

A path written to a meson build file now uses a forward slash, which meson accepts on every platform, and the four targets are built with meson on Windows. This is the same change made for the makefile in #271.

The three paths that are written as text are the source directory, the include directory, and the install directory. The source file list already splits on the separator and joins with the meson path operator, so it was not affected.

The generated meson build file for mt3dms and mf2005 is byte for byte identical on macOS, since a forward slash is already the separator there, and the four targets still build.

The remaining meson exclusions, for mf2000, mf2005, swtv4 and mflgr with the intel-classic compiler, are a different problem. Meson links a target that has both c and fortran sources with the c compiler, and ifort leaves main in the fortran runtime, so the link fails. That is fixed separately.

A meson build file is read as text, so a Windows separator starts an
escape sequence. The source directory written for mt3dms became a tab, the
one for vs2dt became a vertical tab, and the one for gridgen became a
backspace, and none of the three built with meson on Windows. triangle
built because a backslash followed by an s is not an escape.

Write a path to a meson build file with a forward slash, which meson
accepts on every platform, and build the four targets with meson on
Windows. This is the same change made for the makefile in #271.
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.865%. Comparing base (fbc56bf) to head (1bcca6d).

Additional details and impacted files
@@              Coverage Diff              @@
##           develop      #305       +/-   ##
=============================================
+ Coverage   79.854%   79.865%   +0.011%     
=============================================
  Files           20        20               
  Lines         3564      3566        +2     
=============================================
+ Hits          2846      2848        +2     
  Misses         718       718               
Files with missing lines Coverage Δ
pymake/utils/_meson_build.py 88.235% <100.000%> (+0.087%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jdhughes-dev
jdhughes-dev merged commit 33cdd36 into develop Aug 10, 2026
23 checks passed
@jdhughes-dev
jdhughes-dev deleted the meson-path-separators branch August 10, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant