endif()
endif()
endif()
+
+if (OPENMP_STANDALONE_BUILD)
+ # This duplicates code from llvm/cmake/config-ix.cmake
+ if( WIN32 AND NOT CYGWIN )
+ # We consider Cygwin as another Unix
+ set(PURE_WINDOWS 1)
+ endif()
+
+ # library checks
+ if( NOT PURE_WINDOWS )
+ check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
+ endif()
+
+ if(HAVE_LIBPTHREAD)
+ # We want to find pthreads library and at the moment we do want to
+ # have it reported as '-l<lib>' instead of '-pthread'.
+ # TODO: switch to -pthread once the rest of the build system can deal with it.
+ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+ set(THREADS_HAVE_PTHREAD_ARG Off)
+ find_package(Threads REQUIRED)
+ set(OPENMP_PTHREAD_LIB ${CMAKE_THREAD_LIBS_INIT})
+ endif()
+else()
+ set(OPENMP_PTHREAD_LIB ${LLVM_PTHREAD_LIB})
+endif()
${LIBOMPTARGET_DEP_LIBFFI_LIBRARIES}
${LIBOMPTARGET_DEP_LIBELF_LIBRARIES}
dl
+ ${OPENMP_PTHREAD_LIB}
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/../exports")
list(APPEND LIBOMPTARGET_TESTED_PLUGINS