Link Search Menu Expand Document

Use it as a CMake subdirectory

You can use Scistats directly in CMake projects without installing it. Check if you have Cmake 3.14+ installed:

cmake -version

Clone the whole project

git clone https://github.com/alandefreitas/scistats/

and add the subdirectory to your CMake project:

add_subdirectory(scistats)

When creating your executable, link the library to the targets you want:

add_executable(my_target main.cpp)
target_link_libraries(my_target PUBLIC scistats)

You can now add the scistats headers to your source files.

However, it’s always recommended to look for Scistats with find_package before including it as a subdirectory. Otherwise, we can get ODR errors in larger projects.