[PATCH] D138361: [cmake] Fix Findzstd.cmake to handle OpenBSD shared libraries
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 22 17:22:51 PST 2022
phosek accepted this revision.
phosek added a comment.
LGTM
================
Comment at: llvm/cmake/modules/Findzstd.cmake:56-62
if(zstd_STATIC_LIBRARY MATCHES "${zstd_STATIC_LIBRARY_SUFFIX}$" AND
NOT TARGET zstd::libzstd_static)
add_library(zstd::libzstd_static STATIC IMPORTED)
set_target_properties(zstd::libzstd_static PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${zstd_INCLUDE_DIR}"
IMPORTED_LOCATION "${zstd_STATIC_LIBRARY}")
endif()
----------------
mgorny wrote:
> phosek wrote:
> > I'd consider combining this `if` block with the `if` block above.
> Do you have anything specific in mind? What we do here depends on the branch taken in the above `if` but it needs to happen for both branches, i.e. if `zstd_LIBRARY` was a static lib, then we use that, otherwise we rely on separate static lib lookup result.
I misread the condition, thanks for clarifying.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138361/new/
https://reviews.llvm.org/D138361
More information about the llvm-commits
mailing list