-
Notifications
You must be signed in to change notification settings - Fork 181
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
Change build system to CMake #2689
Conversation
4940d70
to
198c086
Compare
69012d9
to
4fa388c
Compare
@MRtrix3/mrtrix3-devs For the full documentation of the new build system, shall I just create a new document that details how to build the project? Or is it better if I wait until we actually start using the branch in practice to obtain more feedback? Furthermore, we currently have two documents (one in the user documentation directory and the other in the developer documentation), both of which explain the build process with significant overlap. I propose that the we should get rid of the any documentation regarding building MRtrix3 from the user documentation and instead provide a single page where the CMake build process is documented for developers. |
bc711d8
to
0abdca6
Compare
Previously, mrview required special handling of QFileOpenEvent and thus bool QApplication::event(QEvent*) was defined mrview.cpp. This strategy is no longer possible since now the code in src is built as a shared library, which requires the function to be defined in the shared library. To get around this we instead rely on a custom event handler using std::function.
Since commands are no longer built in source_dir/bin, we now need to specify the build directory in generate_user_docs.sh
- Remove code within cmd/mrview.cpp that originates from 6417a52 as part of #2689, which was erroneously added in 39240ad. - Fix compilation of src/gui/mrview/file_open.cpp to coincide with changes in #2764; these were omitted from cherry-picks 39240ad and 0afe37b due to that file having already been removed during the course of #2689.
Construction of a 3.1.0 release involves taking features on the development branch and separating them from the adoption of cmake in #2689. Some of these changes involve the use of C++17 features. However the transition to defaulting to C++17 was performed exclusively within the cmake ecosystem. This commit modifies the legacy "configure" script to reflect the increment to use of C++17.
@daljit46 Do you want to have a go at updating this wiki page to also reflect this change? |
This PR supersedes #2620 (which you should check out for the motivations for this proposal). It adds support for building MRtrix3 using CMake.
A major change is that we now build all the code (except for the commands) as a shared library that links to each executable.
As far as I can tell, this is branch should be feature complete and shouldn't miss any major functionalities compared to its base branch. Instructions to build and test can be found here.
What's missing?
share
directory.All of the above would need to be discussed before this is ready for merging.
@MRtrix3/mrtrix3-devs if there is anything needs to be added or changed or something I missed, please let me know.