CMAKE_<TYPE>_SUFFIX is not honoured when passed on command line
For a very simple example CMAKE_STATIC_LIBRARY_SUFFIX is not honoured and ".a" is always added. This can be work-arounded by using the language specific variant, like CMAKE_STATIC_LIBRARY_SUFFIX_CXX but that is not documented as such.
Could it be that
GetDefinition returns a non-null string even though the variable is not set? This would make this test fail: https://gitlab.kitware.com/cmake/cmake/blob/ed16d474ea013c4725a46a54ffbcd2ed5dd26ace/Source/cmGeneratorTarget.cxx#L638