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

Use cmake -B and -S flags to specify the build path #1165

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Atry
Copy link
Contributor

@Atry Atry commented Feb 17, 2022

According to https://cmake.org/cmake/help/latest/manual/cmake.1.html , -B and -S flags are the right way to specify the build path

Copy link
Contributor

@fredemmott fredemmott left a comment

Choose a reason for hiding this comment

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

  • I'm not sure this is 'recommended' as such - it's a way, but the way we're doing things is still documented, and (sorry if I missed it) I'm not seeing a deprecation notice or similar
  • Unless there is a clear recommendation, I prefer the existing syntax: it's compatible with cmake --build and cmake --install, but -S and -B appear to be specific to the configure stage. For context, these are useful when using a backend other than make - for example, xcode projects or ninja. It will run make, ninja, msbuild, xcbuild, or whatever it was configured with, with consistent arguments. This is very handy for cross-platform CI.

I'm not certain on those two points, but regardless, we shouldn't do this yet: we still support Ubuntu 18.04 (cmake 3.10) and Debian Buster (cmake 3.13), and these options appear to be new in CMake 3.14.

  • from a user perspective, I think we should aim for as few version-specific instructions as possible
  • from our perspective, applying this to our own build system would require forking the packaging scripts between versions

@Atry
Copy link
Contributor Author

Atry commented Apr 5, 2022

How about add the -B and -S flags to macOS build? Homebrew should have installed the latest cmake.

Copy link
Contributor

@fredemmott fredemmott left a comment

Choose a reason for hiding this comment

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

That's true, however:

  • there's still not an indication it's preferred
  • I'd rather us avoid unnecessary differences between any of our platforms; keeping stuff the same makes it easier to focus on what's actually different and potentially behavior-changing

@facebook-github-bot
Copy link
Contributor

Hi @Atry!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

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.

3 participants