Make sure you have the command-line developer tools installed: xcode-select --install.
You probably also want to install Homebrew.
Use Homebrew to install the following:
cmakeclang-formatOn Intel Macs, you can install Valgrind with brew install valgrind.
On M1 Macs, we can try installing Valgrind by building from source:
1) brew install autotools
2) Download the latest release and expand the archive
3) run ./autogen.sh
4) run ./configure
5) run make
6) run make install
You may need to use sudo for some subset of the commands. (I haven't been able to try this on an M1 Mac.
I did build successfully on my linux machine, so there aren't any extremely obscure dependencies.)
Looks like Valgrind doesn't build on M1 Macs. Check out the VSCode Remote Containers Extension for what is likely the quickest route to a nice setup.
clang-tidyI found the following gist showing how to set up clang-tidy on OS X. (You can skip the clang-format symlink.)
If you have a linux VM set up from a previous course, see the Linux section below.
While it requires more setup, Windows Subsystem for Linux is probably more convenient to use than a VM. Instructions for setting up WSL are here. There's also a tutorial focused on setting up a development environment. There is also a VSCode tutorial for C++ on WSL.
Despite the name, the VSCode CMake Tools on Linux tutorial also applies to Windows once you download CMake.
You'll want to install the following packages if you don't have them already (these are the Ubuntu package names):
build-essential (g++, make, libc6-dev, etc)cmakeclang-formatclang-tidyvalgrindYou're welcome to use whatever IDE/text editors you like.