-
Notifications
You must be signed in to change notification settings - Fork 740
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
Fix for: issue #471 Adds gsl::joining_thread #509
Conversation
I have no idea why some of these are failing. This branch does not touch the |
I suspect this is waiting for a fix for Issue: #510 |
…nto joining_thread
Added -pthread flag to Clang build
@@ -53,6 +54,16 @@ target_compile_options(gsl_tests_config INTERFACE | |||
> | |||
) | |||
|
|||
target_link_libraries(gsl_tests_config INTERFACE | |||
$<$<CXX_COMPILER_ID:GNU>: | |||
-pthread |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMake provides functionality to discover currently used threading library.
find_package(Threads)
and
${CMAKE_THREAD_LIBS_INIT}
or Threads::Threads
This PR adds <gsl/gsl_thread> and tests/thread_tests.cpp
As per discussion in CppCoreGuidelines isocpp/CppCoreGuidelines#925
This PR provides
gsl::joining_thread
(gsl::detached_thread was removed)