[Openmp-commits] [PATCH] D59451: Fix gettid warnings and one test on FreeBSD

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Apr 5 14:15:34 PDT 2019


Hahnfeld added inline comments.


================
Comment at: openmp/trunk/cmake/OpenMPTesting.cmake:126
+  # around that, until it is fixed there.
+  if(${CMAKE_THREAD_LIBS_INIT} STREQUAL "-lpthread")
+    set(OPENMP_TEST_COMPILER_THREAD_FLAGS "-pthread")
----------------
daphnediane wrote:
> This line is missing quotes and breaks cmake if ${CMAKE_THREAD_LIBS_INIT} is empty see https://bugs.llvm.org/show_bug.cgi?id=41401
Yes. After consulting the CMake documentation I think the correct way of doing this in CMake is `if(CMAKE_THREAD_LIBS_INIT STREQUAL "-lpthread")` (see https://cmake.org/cmake/help/v3.0/command/if.html for variable evaluation). Can you test if that also works for you?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59451





More information about the Openmp-commits mailing list