[PATCH] D54641: [compiler-rt] [cmake] Fix detecting terminfo library

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 18 04:36:01 PST 2018


mgorny updated this revision to Diff 174534.
mgorny edited the summary of this revision.
mgorny added a comment.

Updated for check order change in master.


https://reviews.llvm.org/D54641

Files:
  cmake/config-ix.cmake


Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -121,10 +121,12 @@
 
 # Look for terminfo library, used in unittests that depend on LLVMSupport.
 if(LLVM_ENABLE_TERMINFO)
-  foreach(library tinfo terminfo curses ncurses ncursesw)
+  foreach(library terminfo tinfo curses ncurses ncursesw)
+    string(TOUPPER ${library} library_suffix)
     check_library_exists(
-      ${library} setupterm "" COMPILER_RT_HAS_TERMINFO)
-    if(COMPILER_RT_HAS_TERMINFO)
+      ${library} setupterm "" COMPILER_RT_HAS_TERMINFO_${library_suffix})
+    if(COMPILER_RT_HAS_TERMINFO_${library_suffix})
+      set(COMPILER_RT_HAS_TERMINFO TRUE)
       set(COMPILER_RT_TERMINFO_LIB "${library}")
       break()
     endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54641.174534.patch
Type: text/x-patch
Size: 805 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181118/40fea7a7/attachment.bin>


More information about the llvm-commits mailing list