About BLITZ
Blitz is advanced compilation technique based on SCU approach, intended to speedup debug mode rebuilds of large applications. In fact, BLITZ is what allows U++ to keep libraries in sources form. You can consider BLITZ as automated form SCU.
Blitz processes packages (not the whole program) - each package can have a single blitz-block (blitz block is SCU).
Only .cpp including files with inclusion guards (#ifdef NAME_H #define NAME_H .... #endif) can qualify to be part of blitz-block.
Alternatively, you can force inclusion by
#pragma BLITZ_APPROVE
or
//#BLITZ_APPROVE
(also works for header) or exlusion by
#pragma BLITZ_PROHIBIT.
or
//#BLITZ_PROHIBIT
In addition only files older than one hour qualify for blitz-block. This simple heuristics excludes file that are being worked on - otherwise change in file would always require rebuilding of the whole package, which would be potentially slower.
The files in package that do not qualify for blitz-block are build the regular way.
It is also possible to disable blitz for individual packages, either on project basis (in Package organizer) or in Output mode dialog (machine specific setting).
Files in blitz-block are scanned for any #define, these are undefined after the file. blitz-block is in fact a file generated into output directory that include all blitz approved files and gets compiled instead of them (it is named $blitz.cpp, you can check the output directory for details).
BLITZ also includes one dirty trick to basically allow BLITZ compilation of packages that define static variables names based on the line number (macro __LINE__). Static variables are not visible outside the compilation unit using the normal build process, but when using BLITZ, more than single .cpp files are compiled into single unit and so there is the possibility that two such variables would have the same name.
Therefore BLITZ adds BLITZ_INDEX__ macro, which contains a unique number (index of file) for each .cpp. That way you can create "static" identifiers e.g. like this (and also make it compile without BLITZ):
#define MK__s__(x) s__s##x
#define MK__s_(x) MK__s__(x)
#ifdef BLITZ_INDEX__
#define STATIC_ID MK__s_(COMBINE(BLITZ_INDEX__, __LINE__))
#else
#define STATIC_ID MK__s_(__LINE__)
#endif
|
|
|