docs icon indicating copy to clipboard operation
docs copied to clipboard

Edit to macOS C++ install docs

Open JoFrhwld opened this issue 1 year ago • 3 comments

Submission Checklist

  • [x] Builds locally
  • [x] New functions marked with <<{ since VERSION }>>
  • [x] Declare copyright holder and open-source license: see below

Summary

As currently written, the C++ toolchain documentation for macOS sends users first to install Xcode from the app store. I've placed a check on whether clang++ and make are installed above that. I've also replaced the instructions to install Xcode from the app store with just the xcode-select --install instruction. My reasoning for this is:

Adding a check first
  • It makes the MacOS instructions more parallel with the Linux and Windows instructions, which also have a checking step before an installation step.
  • Some people who are less familiar with these tools may, nevertheless, have installed the Xcode command line tools previously, but don't necessarily remember that they have done so.
  • The documented experience of what options are available, and what will happen, will be different depending on whether or not command line tools have already been installed.
Removing Xcode app install

The documented steps for installing command line tools through the Xcode app appear to be outdated at least by Xcode v15.4. There is no Xcode>Preferences menu, and under Xcode>Settings, there is no Downloads tab. In fact, poking around, it's not entirely clear to me how to install command line tools within the Xcode app.

Installing command line tools with xcode-select --install still works, and involves fewer steps.

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Josef Fruehwald

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

  • Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
  • Documentation: CC BY-ND 4.0 (https://creativecommons.org/licenses/by-nd/4.0/)

JoFrhwld avatar Sep 24 '24 14:09 JoFrhwld

Thank you for updating these! I think it is worth keeping a link to https://developer.apple.com/xcode/ if people want to read more

WardBrian avatar Sep 24 '24 14:09 WardBrian

Thanks for updating, @JoFrhwld. I was coming here to add this from Apple:

You can install the Command Line Tools package by running the xcode-select --install command. Note: macOS comes bundled with xcode-select , a command-line tool that is installed in /usr/bin . It allows you to manage the active developer directory for Xcode and other BSD development tools.

From: https://developer.apple.com/library/archive/technotes/tn2339/_index.html

bob-carpenter avatar Sep 24 '24 16:09 bob-carpenter

I've added both @mitzimorris' admonition against the homebrew version, as well restored a link to the Xcode site as suggested by @WardBrian. Thanks for finding the reference to xcode-select's general availability, @bob-carpenter

JoFrhwld avatar Sep 24 '24 18:09 JoFrhwld