ksahlin / strobemers

A repository for generating strobemers and evalaution
75 stars 12 forks source link

adds cmake compilation #15

Closed blinard-BIOINFO closed 5 months ago

blinard-BIOINFO commented 5 months ago

@ksahlin

This PR introduces cmake compilation as an alternative to the makefile. It allows to build 2 targets:

For the latter, it makes sure that the library is correctly recognized as a cmake-compatible library, e.g. the library can be found and linked by any CMakeList.txt after adding these lines :

FetchContent_Declare(
        strobemer
        GIT_REPOSITORY https://github.com/ksahlin/strobemers.git
        GIT_TAG        b1f2402f14773e1a93f1cda10555cbc3f7142764
        SOURCE_SUBDIR  strobemers_cpp
        OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(strobemer)
find_package(strobemer 0.1 REQUIRED)

Among other advantages, this just made it much easier for us to load and link the library in our CLion projects.

ksahlin commented 5 months ago

Great, thanks!