[llvm-branch-commits] [llvm-branch] r127361 - /llvm/branches/release_29/cmake/modules/LLVMConfig.cmake

Oscar Fuentes ofv at wanadoo.es
Wed Mar 9 13:21:29 PST 2011


Author: ofv
Date: Wed Mar  9 15:21:29 2011
New Revision: 127361

URL: http://llvm.org/viewvc/llvm-project?rev=127361&view=rev
Log:
CMake: fix handling of engine' link components.

Modified:
    llvm/branches/release_29/cmake/modules/LLVMConfig.cmake

Modified: llvm/branches/release_29/cmake/modules/LLVMConfig.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_29/cmake/modules/LLVMConfig.cmake?rev=127361&r1=127360&r2=127361&view=diff
==============================================================================
--- llvm/branches/release_29/cmake/modules/LLVMConfig.cmake (original)
+++ llvm/branches/release_29/cmake/modules/LLVMConfig.cmake Wed Mar  9 15:21:29 2011
@@ -61,6 +61,19 @@
   set( link_components ${ARGN} )
   get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
   string(TOUPPER "${llvm_libs}" capitalized_libs)
+
+  # Expand some keywords:
+  list(FIND link_components "engine" engine_required)
+  if( engine_required )
+    # TODO: as we assume we are on X86, this is `jit'.
+    list(APPEND link_components "jit")
+    list(APPEND link_components "native")
+  endif()
+  list(FIND link_components "native" native_required)
+  if( native_required )
+    list(APPEND link_components "X86")
+  endif()
+
   # Translate symbolic component names to real libraries:
   foreach(c ${link_components})
     # add codegen, asmprinter, asmparser, disassembler
@@ -94,14 +107,13 @@
         list(APPEND expanded_components "LLVM${c}Disassembler")
       endif()
     elseif( c STREQUAL "native" )
-      list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
+      # already processed
     elseif( c STREQUAL "nativecodegen" )
       list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
     elseif( c STREQUAL "backend" )
       # same case as in `native'.
     elseif( c STREQUAL "engine" )
-      # TODO: as we assume we are on X86, this is `jit'.
-      list(APPEND expanded_components "LLVMJIT")
+      # already processed
     elseif( c STREQUAL "all" )
       list(APPEND expanded_components ${llvm_libs})
     else( NOT idx LESS 0 )





More information about the llvm-branch-commits mailing list