Skip to content

Installation

FastQueue supports multiple installation methods across all platforms.

Requirements

RequirementMinimum Version
C CompilerC99 or later (GCC 4.8+, Clang 3.0+, MSVC 2015+)
CMake3.20+
pthreadsLinux/macOS only
Win32 APIWindows only

Package Managers

CMake (FetchContent)

cmake
include(FetchContent)
FetchContent_Declare(
    FastQueue
    GIT_REPOSITORY https://github.com/muhammad-fiaz/FastQueue.git
    GIT_TAG main
)
FetchContent_MakeAvailable(FastQueue)
target_link_libraries(your_target PRIVATE FastQueue::fastqueue)

CMake (subdirectory)

bash
git clone https://github.com/muhammad-fiaz/FastQueue.git
cmake
add_subdirectory(FastQueue)
target_link_libraries(your_target PRIVATE FastQueue::fastqueue)

xmake

lua
add_requires("fastqueue")
target("myapp")
    set_kind("binary")
    add_files("src/main.c")
    add_packages("fastqueue")

Conan

ini
[requires]
fastqueue/0.1.0

[generators]
CMakeDeps
CMakeToolchain
bash
conan install . --output-folder=build --build=missing
cmake --preset conan-release

vcpkg

bash
vcpkg install fastqueue

Building from Source

bash
git clone https://github.com/muhammad-fiaz/FastQueue.git
cd FastQueue
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release

CMake Options

OptionDefaultDescription
FQ_BUILD_TESTSOFFBuild unit tests
FQ_BUILD_EXAMPLESOFFBuild examples
FQ_BUILD_BENCHMARKSOFFBuild benchmarks
FQ_SHAREDOFFBuild shared library
FQ_INSTALLONGenerate install targets
FQ_ENABLE_ASANOFFAddressSanitizer
FQ_ENABLE_UBSANOFFUndefinedBehaviorSanitizer
FQ_ENABLE_TSANOFFThreadSanitizer

Example Build Commands

bash
# Release build
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release

# Debug build with tests and examples
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DFQ_BUILD_TESTS=ON -DFQ_BUILD_EXAMPLES=ON
cmake --build build --config Debug

# Run tests
./build/tests/Release/fq_tests

# Run benchmark
./build/benchmarks/Release/fq_benchmark

Platform-Specific Notes

Linux

Requires pthreads (usually available by default):

bash
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

Windows (MSVC)

cmd
cmake -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config Release

macOS

bash
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

Released under the MIT License.