socketio / socket.io-client-cpp

C++11 implementation of Socket.IO client
MIT License
2.26k stars 730 forks source link

Allow using new C++ standards when building #426

Closed uilianries closed 5 months ago

uilianries commented 5 months ago

Hello!

We are packaging Socket IO Client in Conan (PR https://github.com/conan-io/conan-center-index/pull/24112/) and we use multiple C++ standards in our CI, including C++11 and newer versions.

We found that Socket IO is using C++11 only, via set_property() in CMakeLists.txt. So, this PR replaces that function by target_compile_features, so we can pass CMAKE_CXX_STANDARD and override C++11 to something newer like C++14/17/20/23 (set_property() does not allow override).

Plus, I updated threads requirement in the project:

jmigual commented 5 months ago

Just noticed that I could fix the typo myself 😊