How to CMake Good - 0d - Visual C++ without Visual Studio
Channel: vector-of-bool
Date: 2018-08-12

It's common to want to use Visual C++ but without using the Visual Studio IDE. I'll talk about using Visual C++ is this video without ever starting Visual Studio. You'll be able to compile with MSVC even without using MSBuild. I'll be comparing using CMake with MSBuild, NMake, and Ninja, all using Visual C++.

A useful tip when using a specific generator (with CMake's `-G` flag): You only need to specify the `-G` option the first time you configure a new build directory. Once a build directory has a CMakeFiles/ directory in it, the generator will be remembered as long as that directory exists.

Here are some nice links:

- The "Build C/C++ code on the command line" documentation on MSDN: https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line
- The MSVC command line options documentation on MSDN: https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options
- The MSVC linker command line options documentation on MSDN: https://docs.microsoft.com/en-us/cpp/build/reference/linker-options
- A very important YouTube video: https://www.youtube.com/watch?v=EOcJR9vFqHw
- The Ninja releases page on GitHub: https://github.com/ninja-build/ninja/releases

Say "A semicolon-separated list of directories" three times, fast.