Skip to content

Latest commit

 

History

History
69 lines (54 loc) · 2.72 KB

README.md

File metadata and controls

69 lines (54 loc) · 2.72 KB

sec21

GCC Clang MSVC AppVeyor MSVC2019

codecov CodeQL

sec21 is a collection of useful functions and classes and also the boilerplate for a lot of my projects.

Documentation

See the Wiki for the full documentation, examples, operational details and other information.

Usage

Build sec21 from Sources

Building with CMake is pretty easy, just invoke the following shell commands:

git clone https://github.com/MichaelMiller-/sec21
cd sec21
mkdir _build && cd _build/
cmake ..
sudo make install

Usage in CMake projects

If you have installed sec21 system-wide you can use the CMake-package-system.

find_package(sec21 CONFIG REQUIRED)
## ...
target_link_libraries(target_name PRIVATE sec21::sec21)

Get

There a are several methods to get the library.

Use CPM

One of them is the setup-free CMake CPM dependency manager:

CPMAddPackage("gh:MichaelMiller-/[email protected]")
## ...
target_link_libraries(target_name PRIVATE sec21::sec21)

Use Vcpkg

You also can download and install sec21 using the vcpkg dependency manager:

$ vcpkg install michaelmiller-sec21

Using FetchContent

Alternatively, the project can also be used only in a private context. Simply add the following to your CMakeLists.txt:

include(FetchContent)
FetchContent_Declare(sec21
        GIT_REPOSITORY https://github.com/MichaelMiller-/sec21
        # GIT_TAG ... # optional tag
        )
FetchContent_MakeAvailable(sec21)
## If BUILD_TESTING for sec21 is enabled make sure that Catch2 is available.
## find_package(Catch2 CONFIG REQUIRED)
set_target_properties(sec21 PROPERTIES BUILD_TESTING FALSE)

## Link against sec21::sec21
target_link_libraries(main PRIVATE sec21::sec21)

License

Please see LICENSE.