The CMake file sets CMAKE_CXX_FLAGS with a set(), which can't be overridden on the cmake command line with a -D. So it's not possible to pass additional compiler flags (such as -fPIC for using this library as a dependency of a shared library) into the build.
Thanks from reaching us. I updated the CMakeLists.txt so you can now pass these flags from the command line.
Do not hesitate if you have other questions.
The CMake file sets
CMAKE_CXX_FLAGS
with aset()
, which can't be overridden on thecmake
command line with a-D
. So it's not possible to pass additional compiler flags (such as-fPIC
for using this library as a dependency of a shared library) into the build.https://github.com/Kmer-File-Format/kff-cpp-api/blame/c490ddb603074b0c4c3efecc3a3c8506b059ffaf/CMakeLists.txt#L15