CMAKE_BUILD_TYPE is not being used in CMakeLists.txt

There are two types of generators: single-configurations and multi-configurations. Single configurations Make-like generators: Unix Makefiles, NMake Makefiles, MinGW Makefiles, … You set the configuration type in the generate step: cmake -H. -B_builds/Debug -DCMAKE_BUILD_TYPE=Debug “-GUnix Makefiles” In this case, the build step is always Debug: > cmake –build _builds/Debug /usr/bin/c++ -g … > cmake –build _builds/Debug … Read more