WIP: (Expect the commit history to be cleaned up through a rebase, it's a mess currently I've been trying a lot of things to get this to work).
Please feel free to add comments to the delta as I prepare this PR, and let me know what changes need to be made.
Solves #11 #12 #13 potentially. The summary of changes:
ssplit as a library requires abseil and pcre if it needs to compile outside. Hence target_link_libraries, solving #11. This is a case where I don't need the executable, but the library. libssplit.a is useless without linking. Tests are only useful as long as they cover all use-cases (the library use-case is not covered).
To solve #12, I had to switch from LTS to master, which seemed like a sane thing to do given how the option could be switched. However, this leads to the loss of flat-hash-map container which doesn't seem available in master. I hot-fixed it to use std::string on the map, converting string_view to std::string for key. Should have the same effect I hope.
13 is solved in the process of fixing a compile error and through 2.
CMakeLists is a bit polluted in the process, however, I don't want the following going ahead (for convenient debugging):
Automagic to figure directory or not. As a library user, I want to explicitly disable the compilation with an option. Sane default builds everything. (I removed the hasParent block).
Library default is assumed to be CPP17, and user is asked to switch to CPP11 (should probably mention abseil dependency in message).
WIP: (Expect the commit history to be cleaned up through a rebase, it's a mess currently I've been trying a lot of things to get this to work).
Please feel free to add comments to the delta as I prepare this PR, and let me know what changes need to be made.
Solves #11 #12 #13 potentially. The summary of changes:
target_link_libraries
, solving #11. This is a case where I don't need the executable, but the library.libssplit.a
is useless without linking. Tests are only useful as long as they cover all use-cases (the library use-case is not covered).std::string
on the map, convertingstring_view
tostd::string
for key. Should have the same effect I hope.13 is solved in the process of fixing a compile error and through 2.
CMakeLists is a bit polluted in the process, however, I don't want the following going ahead (for convenient debugging):