mattgodbolt / seasocks

Simple, small, C++ embeddable webserver with WebSockets support
BSD 2-Clause "Simplified" License
734 stars 120 forks source link

Use current binary directory and provide aliases. #110

Closed iwanders closed 5 years ago

iwanders commented 5 years ago

These changes make it possible to embed the Seasocks repo into another CMake project.

The two ALIAS statements add an alias to the targets such that Seasocks::seasocks and Seasocks::seasocks_so can be found when the Seasocks cmake list is executed through a add_subdirectory(seasocks) directive in another cmake list. Without this alias, only seasocks would be found, not Seasocks::seasocks. This technique is also used here for example.

The CMAKE_CURRENT_BINARY_DIR change is then necessary because the Seasocks build may not be at the root of the project anymore.

codecov[bot] commented 5 years ago

Codecov Report

Merging #110 into master will decrease coverage by 0.29%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #110     +/-   ##
=========================================
- Coverage   39.23%   38.93%   -0.3%     
=========================================
  Files          41       41             
  Lines        2039     2029     -10     
=========================================
- Hits          800      790     -10     
  Misses       1239     1239
Impacted Files Coverage Δ
src/main/c/seasocks/IgnoringLogger.h 0% <0%> (-100%) :arrow_down:
src/main/c/seasocks/Logger.h 0% <0%> (-100%) :arrow_down:
src/main/c/seasocks/ToString.h 77.77% <0%> (-22.23%) :arrow_down:
src/main/c/seasocks/Server.h 0% <0%> (ø) :arrow_up:
src/main/c/seasocks/Connection.h 37.5% <0%> (+14.42%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0c42700...2fa6b27. Read the comment docs.

codecov[bot] commented 5 years ago

Codecov Report

Merging #110 into master will decrease coverage by 0.29%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #110     +/-   ##
=========================================
- Coverage   39.23%   38.93%   -0.3%     
=========================================
  Files          41       41             
  Lines        2039     2029     -10     
=========================================
- Hits          800      790     -10     
  Misses       1239     1239
Impacted Files Coverage Δ
src/main/c/seasocks/IgnoringLogger.h 0% <0%> (-100%) :arrow_down:
src/main/c/seasocks/Logger.h 0% <0%> (-100%) :arrow_down:
src/main/c/seasocks/ToString.h 77.77% <0%> (-22.23%) :arrow_down:
src/main/c/seasocks/Server.h 0% <0%> (ø) :arrow_up:
src/main/c/seasocks/Connection.h 37.5% <0%> (+14.42%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0c42700...2fa6b27. Read the comment docs.

offa commented 5 years ago

The codecov report is weird …

Thanks for your contribution @iwanders :+1: