[PATCH] D106131: Fix FindZ3.cmake to support static libraries and Windows

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 28 10:26:06 PDT 2021


JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

Not an expert on Z3 either, but the CMake logic looks sound to me. LGTM.



================
Comment at: llvm/cmake/modules/FindZ3.cmake:12
+  find_package(Threads)
+  if(CMAKE_THREAD_LIBS_INIT)
+    list(APPEND z3_link_libs "${CMAKE_THREAD_LIBS_INIT}")
----------------
I was curious why you're checking `CMAKE_THREAD_LIBS_INIT` instead of `Threads_FOUND `. Maybe include a comment saying that `CMAKE_THREAD_LIBS_INIT ` may be empty if the thread functions are provided by the system libraries and no special flags are needed. 


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

https://reviews.llvm.org/D106131



More information about the llvm-commits mailing list