tcbrindle / flux

A C++20 library for sequence-orientated programming
https://tristanbrindle.com/flux/
Boost Software License 1.0
472 stars 29 forks source link

Create a CMake target upon install #123

Closed mheyman closed 1 year ago

mheyman commented 1 year ago

This updates the CMakeLists.txt file to include the ability to install. The install creates CMake target flux::flux for use in other CMake builds.

That is, you can build like:

cmake -S . -B build --install-prefix "$(realpath .)/install" -DFLUX_BUILD_EXAMPLES=Off -DFLUX_BUILD_TESTS=Off .
cmake --install build

and, in your consuming CMakeLists.txt, use like

find_package(flux CONFIG REQUIRED PATHS "path/to/flux/install")
target_link_libraries(mytarget PRIVATE flux::flux)

The README has an update for this and there is an additional file used as part of the CMake target creation.

codecov[bot] commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (8434e8e) 97.70% compared to head (829c71e) 97.70%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #123 +/- ## ======================================= Coverage 97.70% 97.70% ======================================= Files 67 67 Lines 2398 2398 ======================================= Hits 2343 2343 Misses 55 55 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tcbrindle commented 1 year ago

Thanks for the PR! Being able to install the library is definitely a good idea, so thanks for working on it.

tcbrindle commented 1 year ago

Looks great, thank you!