move inchi-1 specific functions out of library #55
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.
PrintFileName and SplitTime are compiled in the library only when TARGET_API_LIB is not defined, but that is never the case in the cmake build so it fails.
Apparently, those two symbols and few others like DetectInputINChIFileType are only used in the inchi-1 executable, so they were moved in ichimain.c
Please note, this raises a few questions about the whole build system (please let me know if it's better to discuss this elsewhere). In particular, it seems the original Makefiles sort of build a slightly different library depending on the target being built; this makes things a bit confusing in the code and hard to grasp due to the various combinations possible.
Also, this is completely unsupported with cmake so I hope you are open to patches like the present one in order to gradually move toward removing them.
For the record, after this patch is applied there are 32 instances left of
#ifndef TARGET_API_LIB
that I need to investigate because that's code never built into the library, and 17 instances of the reverse check#ifdef TARGET_API_LIB
that mostly seem to add some symbols to the library.