Closed iwanders closed 5 years ago
Merging #116 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #116 +/- ##
=======================================
Coverage 36.35% 36.35%
=======================================
Files 52 52
Lines 2247 2247
=======================================
Hits 817 817
Misses 1430 1430
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 125dd89...27ab414. Read the comment docs.
Merging #116 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #116 +/- ##
=======================================
Coverage 36.35% 36.35%
=======================================
Files 52 52
Lines 2247 2247
=======================================
Hits 817 817
Misses 1430 1430
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 125dd89...27ab414. Read the comment docs.
Thanks for this contribution @iwanders, great enhancement for Cmake integration! :+1:
My pleasure, thanks for the quick turnaround. :+1:
Back again with more cmake improvements, I've finally got to the point where I had to make install rules for my tracing framework Scalopus. I had fixed using Seasocks through
find_package
from the build tree with https://github.com/mattgodbolt/seasocks/pull/108, but hadn't tried compiling against an installed version of Seasocks yet. When I tried that myfind_package(Seasocks)
instruction failed. The currentmake install
of Seasocks only installs the headers and the libraries. This PR adds installing aSeasocksConfig.cmake
which allows cmake to find the installedSeasocks
throughfind_package
. To do this we rely on install(EXPORT), this exports the targets in theSeasocks::
namespace as is convention.This can be tested by setting
-DCMAKE_INSTALL_PREFIX:PATH=/tmp/upstream_prefix/
during compilation, this prefixes themake install
step with that folder. Current upstream installs:With this change, prefix set to
/tmp/with_change_prefix/
:So we install both the
SeasocksConfig.cmake
file and the associated version file. This allows us to use thefind_package
command for Seasocks and also allows using the version field in this command. After usingmake install
we can now use aCMakeLists.txt
like:With serve.cpp from anywhere on our system and cmake will be able to find the installed version of Seasocks.