Build Configurations

When creating a program, there are various options, even for a simple program. The table presented below lists some of the most common and typical values. The ordering is based on how familiar an undergraduate student is with each type of build choice. The developer will choose the configuration they need.

Note that the "Min Configuration" is the minimum number of variations each choice has, as there can be much more. The "Total Configurations" is the minimum number of what is presented here, but there are more than the ones listed.

When you commit a build directory to the repository, you choose which configuration of the >= 82,944. That does not work. So, don't put your generated build files in the repository. Let whoever builds it choose their configuration.

Type Values Notes Min Configurations
Target Operating System Windows, Linux, macOS   3
Architecture x86 (amd64), arm64   2
Standard Compliance and Language Features C++11, C++17, C++23 Even pre-C++11 3
CMake Build Types Debug, Release, RelWithDebInfo, MinSizeRel Can also have custom build options 4
Compiler and Compiler Versions GCC, Clang, MSVC Include specific versions of each 3
Linkage Types static linking, dynamic linking Choice for each library 2
Configuration Options -DTRACE=ON, -DTRACE=OFF Real programs have many configuration options 2
Errors and Warnings -Wall, -Wextra, -Werror Can also turn on/off each warning, e.g., -Wformat, -Wno-format 6
Optimization Levels and Flags -flto, -fomit-frame-pointer, -march=native, -funroll-loops Just the beginning 8
Dependency Versions libarchive 3.7.2 Too many versions to list, and possible multiple dependencies 1
Cross-Compilation Settings Build on amd64 for arm64, build on arm64 for amd64   2
Total Configurations     82,944