Skip to content
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

Experimental Meson build for MMDevice and MMCore #416

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

marktsuchida
Copy link
Member

@marktsuchida marktsuchida commented Dec 14, 2023

The immediate benefit is that this allows us to run the unit tests for MMDevice and MMCore, which we've never had running in CI previously (and were never run on Windows at all). See the included GitHub workflow.

This build is not (so far) appropriate for building MMCore for distribution or actual use. That will come eventually.

This has no effect on the existing Visual Studio and Autoconf/Automake builds, which need to be kept maintained.

This is a first step toward micro-manager/micro-manager#1392. It's a little out of order compared to the plan outlined there (which had MMCoreJ first); I intend to create a separate overview issue (in this repo) for the C++ parts of the build modernization, with some updates to the plan. The reason for adding Meson scripts to MMDevice and MMCore first is so that we don't need to repeat the list of source (.cpp) files in more places than necessary (i.e., MMCoreJ and pymmcore).

For anyone trying it locally: in order to build MMCore you need to copy MMDevice/ into MMCore/subprojects/ before setting up Meson. This is because Meson cannot use subprojects in arbitrary locations (which is a good thing, once you adapt). In our case, we can work around this by copying (or symlinking) projects as needed until we start restructuring Git repositories. Once MMDevice and MMCore have their own repository, Meson can fetch them automatically (or we can use Git submodules).

Marking as draft until the CI passes.

MMDevice builds on its own.

MMCore requires a copy (or symlink) of MMDevice to be in its
subprojects/ directory. (This is unavoidable as we develop the Meson
build in place. When MMDevice and MMCore are in their own repositories
(and/or have source tarballs) MMCore will be able to depend on MMDevice
as either a git submodule or a Meson wrap.)
@tlambert03
Copy link
Contributor

exciting!

@marktsuchida
Copy link
Member Author

marktsuchida commented Dec 14, 2023

Nice, I'd only tested this on Windows and it worked the first time!

GCC and Clang are generating a bunch of warnings; I'll address these in a separate PR (in the code rather than the build, since we get the same warnings in our existing build, too). (EDIT: #417)

@marktsuchida marktsuchida marked this pull request as ready for review December 14, 2023 18:55
@marktsuchida
Copy link
Member Author

I'll also note that there may be missing symbols once we actually use these from MMCoreJ/pymmcore.

@henrypinkard
Copy link
Member

Awesome!

@marktsuchida
Copy link
Member Author

Thanks, @tlambert03 and @henrypinkard.

I'm going to go ahead and merge this since nothing here is difficult to change later.

@marktsuchida marktsuchida merged commit 4db4ff1 into main Dec 14, 2023
3 checks passed
@marktsuchida marktsuchida deleted the mmdevice-mmcore-meson branch December 14, 2023 20:25
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.

3 participants