mkdir buildcmake && cd buildcmake
cmake -GNinja ..
ninja -v
Check that the `-g -O2` flags are set in the compile commands for both
CC and CXX compile lines.
cmake -GNinja .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
ninja -v
Check the compile commands are identical (same flags than default).
rm -rf *
cmake -GNinja .. -DCMAKE_BUILD_TYPE=Debug
ninja -v
Check that the `-g3 -Og` flags (or their fallbacks) and the `-DDEBUG
-DDEBUG_LOCKORDER` flags are set in the compile commands for the CXX
compile lines. Check that the `-g -O2` flags are set in the compile
commands for the CC compile lines.