Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using new C++ standards when building #426

Merged
merged 4 commits into from
May 29, 2024

Conversation

uilianries
Copy link
Contributor

@uilianries uilianries commented May 28, 2024

Hello!

We are packaging Socket IO Client in Conan (PR conan-io/conan-center-index#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:

  • sio_test.cpp uses thread
  • sio_client_impl.h uses thread. It should be public because is listed in the header.
  • examples/Console/main.cpp uses thread

Signed-off-by: Uilian Ries <[email protected]>
Signed-off-by: Uilian Ries <[email protected]>
Copy link
Collaborator

@jmigual jmigual left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi sounds good! Thanks for the good work. I just noticed a typo so if you fix it I'll run the pipeline and merge if successful 😊

CMakeLists.txt Outdated Show resolved Hide resolved
@jmigual
Copy link
Collaborator

jmigual commented May 29, 2024

Just noticed that I could fix the typo myself 😊

@jmigual jmigual merged commit 373a01c into socketio:master May 29, 2024
3 checks passed
@uilianries uilianries deleted the cmake/allow-cppstd branch May 31, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants