Is `CMAKE_ENABLE_EXPORTS` modified when `WINDOWS_EXPORT_ALL_SYMBOLS` is set?

When compiling Snappy v1.1.9 as a shared lib, I noticed the implementation library snappy_test_support.lib was absent.

The main library sets WINDOWS_EXPORT_ALL_SYMBOLS to ON here.

But a test support lib has no such modification.

I’ve observed that snappy.dll, snappy.lib, and snappy_test_support.dll are built without generating snappy_test_support.lib.

Grepping the code (including 3rd party) did not indicate to me that ENABLE_EXPORTS was otherwise modified.

I couldn’t find any documentation to indicate setting WINDOWS_EXPORT_ALL_SYMBOLS would have a side effect. A brief perusal of the code was - for me - inconclusive.

Is the CMakeLists.txt file faulty or is there a defect elsewhere?

CMake v3.22.1 on Win64.

A missing .lib means that the library exports no symbols. ENABLE_EXPORTS is only defined to mean anything for executables, not libraries.

You can either add proper export macros on the support library’s declarations or use the same WINDOWS_EXPORT_ALL_SYMBOLS as the main library.

Of course! Thanks for the quick response.