X Tutup
Skip to content

Make the use of system-wide Meson and Ninja easier#1951

Merged
pcarruscag merged 7 commits intosu2code:developfrom
frx-wintermute:allow_system_meson
Mar 16, 2023
Merged

Make the use of system-wide Meson and Ninja easier#1951
pcarruscag merged 7 commits intosu2code:developfrom
frx-wintermute:allow_system_meson

Conversation

@frx-wintermute
Copy link
Contributor

Proposed Changes

This change makes it easier to use system-wide Meson and Ninja in order to build SU2 from source.

Related Work

See issue #1945 for more information.

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

print ('Downloading ninja ... ')
try:
urllib.request.urlretrieve (ninja_exe_url,'ninja-win.zip')
except:

Check notice

Code scanning / CodeQL

Except block handles 'BaseException'

Except block directly handles BaseException.
Copy link
Member

@pcarruscag pcarruscag left a comment

Choose a reason for hiding this comment

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

This is nice, thanks. Please add yourself to AUTHORS.md and then we can merge

@pcarruscag pcarruscag changed the base branch from master to develop March 11, 2023 23:39
@pcarruscag
Copy link
Member

We use "develop" as the staging branch, update your branch with develop when you push the changes.

@pcarruscag pcarruscag mentioned this pull request Mar 12, 2023
5 tasks
@frx-wintermute
Copy link
Contributor Author

We use "develop" as the staging branch, update your branch with develop when you push the changes.

@pcarruscag, thanks for the suggestions. I will apply the two code changes (I will drop the superfluous import in meson.py and I will move the timestamp creation at the end of preconfigure.py).

How should I update my branch with upstream/develop?
Should I merge upstream/develop into my branch (and push to my fork on github)?
Or may I rebase my branch on top of upstream/develop (and force push to my fork on github)?

@frx-wintermute
Copy link
Contributor Author

This is nice, thanks. Please add yourself to AUTHORS.md and then we can merge

You're welcome, @pcarruscag . I am glad that we are finding a solution that works for everyone.

I assume I should add myself to the Individual Contributors section of AUTHORS.md, is that correct?

@kursatyurt
Copy link
Contributor

How should I update my branch with upstream/develop? Should I merge upstream/develop into my branch (and push to my fork on github)? Or may I rebase my branch on top of upstream/develop (and force push to my fork on github)?

Both ways are legit, feel free to use which one is easier for you here a comparison between them. It depends on the taste of the developer.

I assume I should add myself to the Individual Contributors section of AUTHORS.md, is that correct?

Yes

See github issue [#1945] for more information on the rationale.

[#1945]: <#1945>

If a user wants to build SU2 from source and prefers to use
system-wide Meson and Ninja (assuming they are installed on the OS),
rather than SU2-specific copies, it is possible to avoid downloading
SU2-specific versions:

  $ SU2_MESON='no' ./meson.py
  $ export CXXFLAGS=<preferred_compiler_options>
  $ meson setup <preferred_config_options> build
  $ ninja -C build install

The default behavior is unchanged. If a user does not have system-wide
Meson and Ninja installed on the OS and/or prefers to use SU2-specific
copies, it is stll possible to download and use SU2-specific versions
of Meson and Ninja:

  $ export CXXFLAGS=<preferred_compiler_options>
  $ ./meson.py setup <preferred_config_options> build
  $ ./ninja -C build install
If a user wants to build SU2 from source and prefers to use
system-wide Meson and Ninja (assuming they are installed on the OS),
rather than SU2-specific copies, it is possible to avoid downloading
SU2-specific versions:

  $ ./preconfigure.py
  $ export CXXFLAGS=<preferred_compiler_options>
  $ meson setup <preferred_config_options> build
  $ ninja -C build install

The default behavior is unchanged. If a user does not have system-wide
Meson and Ninja installed on the OS and/or prefers to use SU2-specific
copies, it is stll possible to download and use SU2-specific versions
of Meson and Ninja:

  $ export CXXFLAGS=<preferred_compiler_options>
  $ ./meson.py setup <preferred_config_options> build
  $ ./ninja -C build install
It's now unused in meson.py (its use has been moved to
preconfigure.py).
@frx-wintermute
Copy link
Contributor Author

How should I update my branch with upstream/develop? Should I merge upstream/develop into my branch (and push to my fork on github)? Or may I rebase my branch on top of upstream/develop (and force push to my fork on github)?

Both ways are legit, feel free to use which one is easier for you

I have just force-pushed a rebased branch.
I hope everything is OK.

@pcarruscag
Copy link
Member

Merge and push is simpler I think, and with that the reviewers have the option of only seeing the new commits.
Thanks for the changes, we'll merge once the tests pass.

@pcarruscag pcarruscag merged commit ce2d679 into su2code:develop Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

X Tutup