- add zstd to llvm::compression namespace
- add a CMake option LLVM_ENABLE_ZSTD with behavior mirroring that of LLVM_ENABLE_ZLIB
- add tests for zstd to llvm/unittests/Support/CompressionTest.cpp
- add a cmake macro (TryFindDependencyMacro.cmake) to aid in finding "modern cmake" style dependencies such as Zstd in an "optional" or "REQUIRED" manner.
Details
- Reviewers
aemerson leonardchan sebastian-ne
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
@sebastian-n yes because facebook is surprisingly good at "modern cmake" practices with shipping libzstd and so `find_dependency(zstd)` is enough to have the lib `zstd::libzstd_shared``` get defined!
I have hopes that this will fix the issues mac os users reported with the old version of this patch.
make it try to find dependency instead of normal find_dependency macro (because the return breaks things on failure)
Nice, makes sense. It definitely fixes the issue when llvm is included with add_subdirectory.
llvm/cmake/modules/LLVMConfig.cmake.in | ||
---|---|---|
79 | Should this be lower case zstd? I saw some cmake errors here and they disappear when this is lower case. |
llvm/cmake/modules/LLVMConfig.cmake.in | ||
---|---|---|
79 | good catch, It should also probably be another find_dependency call instead of find_package so I fixed that too |
Should this be lower case zstd? I saw some cmake errors here and they disappear when this is lower case.