The point of this assignment is to prove that you are able to piece all the missing pieces of information together to create a working barebones CMake project.
Therefore this file will mostly consist of useful notes and links to get you started on this assignment.
- You want to avoid hard-coding paths
- You need to build a package on more than one computer
- You want to use CI (continuous integration)
- You need to support different OSs (maybe even just flavors of Unix)
- You want to support multiple compilers
- You want to use an IDE, but maybe not all of the time
- You want to describe how your program is structured logically, not flags and commands
- You want to use a library
- You want to use tools, like Clang-Tidy, to help you code
- You want to use a debugger
See the Modern-CMake wiki introduction page for more reasons and history on CMake (and why there are so many different styles of CMake on the web)
It is the script the CMake tool uses to configure your build environment. It automatically generates the required build files for your compiler and linker.
See the Modern-CMake Basics introduction to see the general structure of a CMake project
It is recommended to use the structure as described by the Modern-CMake structure page.
There are three main ways to include other projects or libraries in to your CMake project:
- Using git submodule's
- Using CMake's DownloadProject module
- Using CMake's Fetch module
You can also take a look at the CMake's original documentation