[PATCH] D138361: [cmake] Fix Findzstd.cmake to handle OpenBSD shared libraries

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 20 07:36:38 PST 2022


mgorny added inline comments.


================
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()
----------------
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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138361/new/

https://reviews.llvm.org/D138361



More information about the llvm-commits mailing list