[Openmp-commits] [openmp] r357828 - After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not

Dimitry Andric via Openmp-commits openmp-commits at lists.llvm.org
Fri Apr 5 15:19:40 PDT 2019


Author: dim
Date: Fri Apr  5 15:19:40 2019
New Revision: 357828

URL: http://llvm.org/viewvc/llvm-project?rev=357828&view=rev
Log:
After rL357618, quote ${CMAKE_THREAD_LIBS_INIT} so CMake does not
complain when the variable is empty.  Fixes PR 41401.

Modified:
    openmp/trunk/cmake/OpenMPTesting.cmake

Modified: openmp/trunk/cmake/OpenMPTesting.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/cmake/OpenMPTesting.cmake?rev=357828&r1=357827&r2=357828&view=diff
==============================================================================
--- openmp/trunk/cmake/OpenMPTesting.cmake (original)
+++ openmp/trunk/cmake/OpenMPTesting.cmake Fri Apr  5 15:19:40 2019
@@ -123,7 +123,7 @@ else()
   # Unfortunately the top-level cmake/config-ix.cmake file mangles CMake's
   # CMAKE_THREAD_LIBS_INIT variable from the FindThreads package, so work
   # around that, until it is fixed there.
-  if(${CMAKE_THREAD_LIBS_INIT} STREQUAL "-lpthread")
+  if("${CMAKE_THREAD_LIBS_INIT}" STREQUAL "-lpthread")
     set(OPENMP_TEST_COMPILER_THREAD_FLAGS "-pthread")
   else()
     set(OPENMP_TEST_COMPILER_THREAD_FLAGS "${CMAKE_THREAD_LIBS_INIT}")




More information about the Openmp-commits mailing list