building a shared library NMAKE : fatal error U1077

The issues seems to be related to https://gitlab.kitware.com/cmake/cmake/-/issues/16282
Removing CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS usage and using GenerateExportHeader solves the issue in my case.

A.