[Openmp-commits] [PATCH] D34632: Check for libdl, and only use it when available

Dimitry Andric via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 26 11:01:16 PDT 2017


dim updated this revision to Diff 103996.
dim edited the summary of this revision.
dim added a comment.

Use `CMAKE_DL_LIBS` instead. This is in CMake since at least 2012, if not before.


https://reviews.llvm.org/D34632

Files:
  libomptarget/CMakeLists.txt


Index: libomptarget/CMakeLists.txt
===================================================================
--- libomptarget/CMakeLists.txt
+++ libomptarget/CMakeLists.txt
@@ -95,7 +95,7 @@
   # Build libomptarget library with libdl dependency.
   add_library(omptarget SHARED ${src_files})
   target_link_libraries(omptarget
-    dl
+    ${CMAKE_DL_LIBS}
     "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports")
   
   # Install libomptarget under the lib destination folder.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34632.103996.patch
Type: text/x-patch
Size: 480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170626/11431e13/attachment.bin>


More information about the Openmp-commits mailing list