fix: write a meson build file with a forward slash separator - #305
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.0followed by a tab andrue-binary, the one for vs2dt became a vertical tab, and the one for gridgen became a backspace, reported by meson asInclude 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.