Skip to content

35 investigate migrating to meson [WIP] #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

ErichZimmer
Copy link
Contributor

@ErichZimmer ErichZimmer commented Mar 15, 2024

NOTICE:

This pull request commits significant changes to the project. As such, it is important to review all changes cerefully.

Preface

The Meson build system offers a concise and effect way to compile applications and libraries. As it is a newer build system using modern Python, it avoids some pitfalls associated with CMake. Additionally, it offers native cross-compilation through the use of cross-compilation build files.

New:

  • subprojects folder contains most external dependencies

Changes:

  • Build system is now based on Meson
  • test directory was renamed to tests

Work in Progress

  • meson.build files for benchmarks need to be fixed
  • Executables hang after completion on Windows when using MinGW (this is a MinGW problem)
  • Add support for MSVC compiler (requires __declspec(dllexport))
  • Fix merge conflicts

@ErichZimmer ErichZimmer added the feature adding a new feature to the code label Mar 15, 2024
@ErichZimmer ErichZimmer requested a review from timdewhirst March 15, 2024 04:58
@ErichZimmer ErichZimmer changed the base branch from master to 35-investigate-migrating-to-meson March 17, 2024 23:21
README.md Outdated
`cmake -DCMAKE_BUILD_TYPE=RelWithDebugInfo -B build -S .`.
To get binaries:
* `meson install -C builddir` if the prefix was set or
* `meson install -C buildfir --destdir <some directory>` to install in a specifit directory.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/specifit/specific/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That typo is fixed. Apparently, I overlooked it when checking for grammatical errors.


* build
* test -> *_test
Make sure the prefix, or destdir, is set so binaries are not accidentally installed on the system.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would hope for unix-like environment permissions would prevent installation!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be an issue for Unix. However, Windows is where that warning was primarily targeted for. If not set, Meson defaults to C:/ (or whatever letter the current drive is assigned) which could may cause issues and cluttering of the drive. I can be more explicit on that topic if needed.


pkgconfig = import('pkgconfig')

pkgconfig.generate(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any way this information can be taken from the project object rather than repeating?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the redundant information through meson project defines.

@timdewhirst timdewhirst merged commit a3a858d into OpenPIV:35-investigate-migrating-to-meson Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature adding a new feature to the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants