Errors with ns3::Version because of missing defines

I'm trying to build ns-3 (3.36.1) with -DNS3_ENABLE_BUILD_VERSION=ON. But for me NS3_VERSION_TAG_DISTANCE is not defined in the cmake generated version-defines.h ("/* #undef VAR */"). This causes version.cc fail to compile.

It is probably caused by #cmakedefine in version-defines-template.h. Following the CMake documentation it will evaluate to "undef" if the replacement variable would evaluate to false for an if() statement.

NS3_VERSION_TAG_DISTANCE is 0 for my configuration and therefore not defined in the output. Maybe #cmakedefine can simply be replaced with #define. And maybe this issue can also occur for other defines which can become 0 like the minor or patch version in the future.