heronr opened a new pull request #4071: [Issue 2461][pulsar-client-cpp] Modified CMake files and source to enable compilation on Windows URL: https://github.com/apache/pulsar/pull/4071 Fixes #2461 ### Motivation My motivation was to be able to use the pulsar cpp client on Windows systems. ### Modifications There are a number of modifications I needed to make to enable Windows compilation * Extensive rework of multiple CMakeLists.txt files * The creation of a PULSAR_PUBLIC define to define symbol visibility in lieue of #pragma GCC visibility push(default). This is because Windows requires specifying __declspec(dllexport) and __declspec(import) explicitly and does not have a #pragma GCC visibility push(default) analogue. * all calls to usleep or sleep have been replaced with calls to boost::this_thread::sleep() * Included the source to [dlfcn-win32](https://github.com/dlfcn-win32/dlfcn-win32) to provide a windows implementation for all functions in dlfcn.h ### Verifying this change This change is a trivial rework / code cleanup without any test coverage. However, it does introduce a new platform to test on. It is likely that CI checks will have to be created. ### Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): yes - It adds a dependency to the dlfcn-win32 library for Windows builds. I have chosen to simply include the source of this library as part of the PR. - The public API: no - The schema: no - The default values of configurations: no - The wire protocol: no - The rest endpoints: no - The admin cli options: no - Anything that affects deployment: no ### Documentation - Does this pull request introduce a new feature?: No - The README.md file in pulsar-client-cpp has been updated with instructions for Windows compilation
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
