If you want to disable performance optimizations, add this flag -DENABLE_EXTRAS=0
Only necessary if you're debugging.
If you want to enable extra logs, add this flag: -DENABLE_EXTRA_LOGS=1
Note: Will be CPU intensive.
Enable all warnings when compiling: -DWITH_WARNINGS=1
Disable all uses of PCH:
-DNOPCH=1
Or one by one:
-DUSE_COREPCH=0
-DUSE_SCRIPTPCH=0
May increase build times.
Other options are available here: