Repository navigation
fix hex package build outside a git checkout (#17) - #19
Merged
Merged
Conversation
The `git submodule update --init --recursive` compile pre_hook ran unconditionally and aborted the build on a hex tarball, which is not a git checkout. The hook is not needed: the only submodules are snappy's googletest and benchmark, and build-snappy.cmake disables both. Also stop passing unresolved compression paths to the generator. When find_package fails, SNAPPY_INCLUDE_DIR keeps its `-NOTFOUND` value and was still used as an include directory, so cmake failed the generate step on hosts without system snappy. Include dirs and link libs are now collected from the `_FOUND` variables, which cover the bundled builds too. Same fix for lz4 and zstd. Add a CI job that builds a git-less tree with no bundled overrides, so neither failure can come back unnoticed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #17.
The
git submodule update --init --recursivecompile pre_hook ran unconditionally, so it died withfatal: not a git repositoryon a hex tarball and aborted the build. The hook is unnecessary: the only submodules are snappy's googletest and benchmark, andbuild-snappy.cmakedisables both.The second part of the report is fixed too. When
find_package(Snappy)fails,SNAPPY_INCLUDE_DIRkeeps itsSNAPPY_INCLUDE_DIR-NOTFOUNDvalue and was still used as an include directory, so cmake failed the generate step on hosts without system snappy. Include dirs and link libs are now collected from the_FOUNDvariables, which also cover the bundled builds. lz4 had the same bug, and zstd with-DWITH_BUNDLE_ZSTD=OFF.Neither failure was visible in CI, which always checks out with
submodules: recursiveand forcesWITH_BUNDLE_LZ4/SNAPPY=ON. A newpackagejob builds a git-less tree with no bundled overrides and no system snappy/lz4 installed.