I found the source of DEBUG define which break so many (all?) debug builds. It comes from here and here. I don’t know why HDF5 people decided to publicly export DEBUG define. NDEBUG is redundant as it is defined by the compiler. Anyway, the export propagates to tests and blows up in itkLoggerBase.h.
Renaming the DEBUG enumeration into something else e.g. DEBUGGING would work. Can someone think of a more elegant solution to this problem?
Matt’s solution seems correct/practical. But perhaps those PriorityLevelType enums should be renamed (with old ones kept as deprecated?). Though the ‘ITK Coding Style Guide’ strangely seems to not include the word ‘enum’, it does say CamelCase is preferred, so it seems an ITK class should not have an enum named “DEBUG” at all…