Build Configurations

Building a program, even a simple one, offers many options. The table below lists some of the most common. The ordering reflects an undergraduate student's familiarity with each build type. The developer has to choose the configuration they need.

Note that the "Minimum Configuration" is the minimum number of variations each choice has, as there can be so 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. And allows them to easily build as many variations as they need.

Type Values Other Values/Variations Minimum Configurations
Target Operating System Windows, Linux, macOS Each OS has multiple releases  
Architecture x86 (amd64), arm64 (aarch64)    
Standard Compliance and Language Features C++11, C++17, C++23 pre-C++11  
CMake Build Types Debug, Release, RelWithDebInfo, MinSizeRel Custom build options  
Compiler and Compiler Versions GCC, Clang, MSVC Specific releases  
Linkage Types static linking, dynamic linking Choice for each library used  
Configuration Options -DTRACE=ON, -DTRACE=OFF Real programs have many configuration options  
Errors and Warnings -Wall, -Wextra, -Werror Can also individually turn off each warning or error, e.g., -Wformat, -Wno-format  
Optimization Levels and Flags -flto, -fomit-frame-pointer, -march=native, -funroll-loops Lots of these, and can also turn them off, e.g., -fno-lto  
Dependency Versions libarchive 3.7.2 Too many versions to list, and possible multiple dependencies  
Cross-Compilation Settings Build on X86 for arm64, build on arm64 for X86    
Total Configurations   Does not take into account other variations 82,944 {: #total-configurations }