The C++20 implementation of Sleep Sort using std::thread.
The following versions or newer required.
For Windows:
- MS Visual Studio 2022
For Ubuntu, MacOS:
- CMake 3.22
- GNU Make-4.3
- C++20 compliant compiler: clang-15.0.6 or g++-11.3.0
Optional:
- clang-format-15.0.6
- Doxygen-1.9.1
- Graphviz-2.43.0
- Generate the build system and navigate to the directory:
$ cmake -Bbuild
optoins(default):
- BUILD_DOC(OFF): Build API Documents
- ENABLE_FORMAT(OFF): Enable Format sources
Example:
$ cmake -DBUILD_DOC=ON -DENABLE_FORMAT=ON -Bbuild
- build and test:
When BUILD_DOC
is ON, API document is also generated.
$ cd build
$ cmake --build . -j
$ ctest -C Debug
- Format sources anytime using
clangformat
target:
requires ENABLE_FORMAT
is ON
.
$ cmake --build . --target clangformat
- Build Docker image:
$ docker build -t sleep-sort .
- Run Docker container:
$ docker run --rm -it -v $PWD:/sleep-sort -w /sleep-sort sleep-sort
- Go implementation of sleep sort.
- zemasoft, ClangFormat.cmake module
MIT