stroupo / hash-maps

This repository contains some implementations for different hash maps.
0 stars 1 forks source link

Hash Maps

master
development
Current

Installing doctest

Run the following commands in a directory appropriate for temporarily saving source code and build configurations.

git clone https://github.com/onqtam/doctest.git
cd doctest
mkdir build
cd build
cmake ..
cmake --build .
sudo cmake --build . --target install

Building

Run the following commands in the source directory.

mkdir build
cd build
cmake ..
cmake --build .

Testing

In the directory build, that was created for building the actual binaries, run the following command.

ctest --verbose

Installation

In the directory build, that was created for building the actual binaries, run the following command to install the compiled libraries together with the CMake package. Make sure that you have the permissions to install system libraries. Otherwise change the CMake installation prefix or use sudo.

cmake --build . --target install

Uninstallation

In the directory build, that was created for building and installing the actual binaries, run the following command to uninstall the compiled libraries. Make sure that you have the permissions to remove system libraries.

cmake --build . --target uninstall

Execution

In the directory build, that was created for building the actual binaries, run the following commands.

./main

Usage in other CMake projects

One can find the installed package by the following command.

    find_package(hash_map CONFIG REQUIRED)

For linking against it, one has to use the namespace stroupo.

    target_link_libraries(${TARGET_NAME} PRIVATE/PUBLIC/INTERFACE stroupo::hash_map)

Note that the installation of the library is not required to find and use the CMake package. After building the source code of the project CMake exports a local package configuration which refers to the current build directory. As long as this build directory exists the commands written above can be used to find the library.

Todo

Resources