|
ThreadSchedule 4.1.0
Modern C++ thread management library
|
ThreadSchedule requires CMake 3.14 and C++17. Linking the main target adds the include directory, platform thread library, and a cxx_std_17 requirement; it does not force a newer standard selected by the consuming project.
| Target | Availability | Purpose |
|---|---|---|
| ThreadSchedule::ThreadSchedule | Always | Header-only C++17 API |
| ThreadSchedule::Runtime | THREADSCHEDULE_RUNTIME=ON | Optional shared process registry |
| Option | Default | Purpose |
|---|---|---|
| THREADSCHEDULE_RUNTIME | OFF | Build the optional C++ registry runtime |
| THREADSCHEDULE_BUILD_TESTS | OFF | Build the test suite |
| THREADSCHEDULE_BUILD_EXAMPLES | OFF | Build examples |
| THREADSCHEDULE_BUILD_BENCHMARKS | OFF | Build benchmarks |
| THREADSCHEDULE_BUILD_DOCS | OFF | Add the Doxygen target when available |
| THREADSCHEDULE_WARNINGS_AS_ERRORS | OFF | Treat warnings from ThreadSchedule headers and repository targets as errors |
| THREADSCHEDULE_WINDOWS_VISTA_COMPAT | OFF | Enable Vista compatibility mode by targeting _WIN32_WINNT=0x0600 and disabling Win7+ feature paths |
| THREADSCHEDULE_INSTALL | Top-level only | Generate install rules and package files |
ThreadSchedule does not change global compiler flags, the selected C++ standard, or the MSVC runtime library of a parent project. The consumer owns those project-wide choices.
The source tree also provides cmake/ThreadScheduleAddCPM.cmake. It reads the checkout's VERSION file so its CPM tag cannot drift from the supplied headers.
ThreadSchedule::Runtime propagates the header-only API, so consumers do not need to link both targets. Every DSO must use the same ThreadSchedule headers, compiler ABI, standard library ABI, architecture, and runtime-library mode.
The standalone examples/getting_started project is a minimal installed-package consumer and is exercised by documentation CI.
The root conanfile.py packages header-only mode by default and provides the optional shared=True setting. conan create . --build=missing builds the package and its test_package consumer. Conan packaging does not change the CMake target names.
Conan 2.35 and newer can also obtain the recipe using an experimental Git requirement pinned to a release tag. See the README example.
The experimental named module is available from the source checkout through the separate mcpp development build. CMake and Conan consumers use the public headers and targets described here.
The old StableAbi and Module targets and their associated options were removed in 3.0. See the migration guide.