feat: Improved compatibility & support for -- arg
#150
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improved compatibility +
--supportHowdy!
This PR has a few fixes for building the project, as well as a new feature or two, and a fix for a segfault.
New features
--to stop parsing CLI options and move on to positional argumentsect -9 -- -Image-.png-9as an option-Image-.pngas a filenameFollowing Unix argument passing conventions, specifying "--" by itself as a command line argument signifies that every argument that follows should be treated as positional rather than as an option, even if it starts with a dash. This allows for easily passing filenames as arguments that have names beginning with dashes.
ecton files with paths with multi-byte characters, as well as on paths longer than 260 charactersBuild improvements
Build fixes
find_packagecall to locate zlib would fail on account of not being able to find the library file. The library file doesn't exist at configure time, since it is a target that is built at build time, so this required a workaround to forcefind_packageto find the path that the built library will eventually takefind_packagecall would fall back to finding the system zlib for the first build, and would only pick up on the custom zlib on subsequent builds in the same build treeectmay be using an entirely wrong zlib library (whatever system versionfind_packagefound)#include-ingmain.hwas relying on the<filesystem>header to transitively include<cstdint>, and would break if<filesystem>wasn't included, even if it was not otherwise using<filesystem>at allmain.hjust also includes<cstdint>libgccandlibstdc++were still being linked dynamically in some casesCMakeLists.txttries its darndest to make things static<filesystem>features can be enabled__cplusplus >= 201703L, but MSVC normally keeps this macro's value as199711Lregardless of the actual C++ standard in use__has_includemacroNon-build fixes
LzFind.chave been changed to not violate strict aliasing rulesP.S.
Thanks for the cool project!