The first commit turns the cmake setup of PTHash into something that can be used as a library more easily. For this, it sets the compiler options on the PTHash target, instead of setting them on all targets using the library (target_compile_options instead of CMAKE_CXX_FLAGS). It also removes the hard-coded -o3 flag, which would otherwise force library users to always have optimization enabled, even if they do a debug build. -o3 is added automatically when selecting the Release cmake build type.
The second commit switches to including the essentials library through cmake instead of hardcoded paths. That makes it possible to include PTHash together with another project that also uses the essentials library.
This PR contains two commits.
target_compile_options
instead ofCMAKE_CXX_FLAGS
). It also removes the hard-coded-o3
flag, which would otherwise force library users to always have optimization enabled, even if they do a debug build.-o3
is added automatically when selecting theRelease
cmake build type.essentials
library through cmake instead of hardcoded paths. That makes it possible to include PTHash together with another project that also uses theessentials
library.Fixes https://github.com/jermp/essentials/issues/6