CXXFLAGS
CXXFLAGS is an environment variable and make variable used to specify flags for the C++ compiler when building software. It is commonly used in Makefiles and build scripts to customize compilation options for C++ source files and is often read by the CXX variable, which holds the compiler command. CXXFLAGS is distinct from CFLAGS (used for C compilation) and CPPFLAGS (preprocessor options) and from LDFLAGS (linker options). In many projects, CXXFLAGS is combined with user-provided flags so developers can influence builds without editing the build system.
Common options included in CXXFLAGS cover optimization, debugging, warnings, standards, and compiler-specific features. Typical flags are
Usage example: CXXFLAGS="-O2 -g -Wall -std=c++17" make. On Windows with non-GNU toolchains, the exact flag names