I had a look at the most common questions about CMake that people ask Google. Some of them had rather poor answers. So, here are some rapid-fire answers to the most common questions.

Want to get up to speed with CMake quickly? Click here...

What is CMake? And What is it Used For?

CMake is a build system for C++ that's designed to enable writing cross-platform software (e,g, software that runs on Windows, MacOS X, Linux, etc.). More accurately, it's a meta-build system because it works by generating build scripts for different compilers.

Too complicated for you? In brief, CMake enables programmers to compile and link (a.k.a., build) C++ source-code into working software on multiple different computer platforms.

CMake also includes features to assist with software testing and packaging the software for release (to end-users).

You can read more on the official CMake website.

What is the Use Of CMake in C++?

This has sort-of been answered above. CMake is used to compile multiple C++ source files into binaries (i.e., software that can be run). This is also known as "building the code." Programmers write scripts describing which C++ files should be compiled, and how they should be linked together.

It sounds simple, and it is... until you start building software for multiple platforms, each with their own needs (e.g., Windows, MacOS X, and Linux have different ways of doing things).

Does CMake Only Work For C++?

No. It was designed for C++, but can be used to build software written in other languages. It supports the C language, and can also be used with Java, Rust, and other languages.

While it's possible to use CMake with other programming languages, you're much more likely to see it used with C++.

Can I use CMake for Python?

 Err, yes, although it depends on what you mean. Python scripts normally don't need to be compiled (the Python runtime can compile scripts on-demand). You can use Python from CMake, and also build a Python library to use C++ code from Python (and vice versa) using pybind11.

What Programming language is CMake?

CMake isn't a programming language, but a (meta) build system. It does have its own scripting language, though. The CMake scripting language is NOT intended for general purpose programming, but for building C/C++ source code into runnable software (such as applications, games, and the libraries they use).

Is CMake a Scripting Language?

At risk of splitting hairs over semantics, CMake isn't a scripting language; it has a scripting language. It's a system for building software., and its scripting language is how programmers describe what source files, libraries, etc., are to be compiled and linked to make the end product (such as an app, game, or shared library). 

What's the Difference Between C++ and CMake?

C++ is a general purpose programming language for writing software. CMake is a build system for compiling and linking C/C++ source code into runnable software.

Is CMake Better than Visual Studio?

It's impossible to answer this, because CMake and Visual Studio are two very different tools. CMake is a build system, and Visual Studio is an Integrated Development Environment (IDE). They're incomparable.

In fact, you can use them both at the same time. CMake can generate Visual Studio projects, and Visual Studio has built-in CMake support.

How Can I Create Software using CMake?

Interesting that you should ask, because I'm working on a CMake tutorial right now. In brief, you write CMake script files describing the software to be built, and the source-code and libraries to be included. You then run CMake on the main (a.k.a., root) CMake file. It generates a build script for your compiler, which you then run (via CMake) to build the software.

Sounds complicated? Here's a short tutorial to get you started. When you're ready to master CMake, then take my CMake Tutorial book/course. It'll get you up to speed fast.

The CMake Tutorial Cover