[llvm-commits] [llvm] r73216 - in /llvm/trunk: CMakeLists.txt cmake/modules/AddLLVM.cmake cmake/modules/AddPartiallyLinkedObject.cmake docs/CMake.html

Oscar Fuentes ofv at wanadoo.es
Thu Jun 11 19:49:54 PDT 2009


Author: ofv
Date: Thu Jun 11 21:49:53 2009
New Revision: 73216

URL: http://llvm.org/viewvc/llvm-project?rev=73216&view=rev
Log:
CMake: New variable LLVM_LIBDIR_SUFFIX.

Patch by Ingmar Vanhassel!

Modified:
    llvm/trunk/CMakeLists.txt
    llvm/trunk/cmake/modules/AddLLVM.cmake
    llvm/trunk/cmake/modules/AddPartiallyLinkedObject.cmake
    llvm/trunk/docs/CMake.html

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=73216&r1=73215&r2=73216&view=diff

==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Jun 11 21:49:53 2009
@@ -26,6 +26,7 @@
 set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
 set(LLVM_TOOLS_BINARY_DIR ${LLVM_BINARY_DIR}/bin)
 set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples)
+set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
 
 set(LLVM_ALL_TARGETS
   Alpha

Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=73216&r1=73215&r2=73216&view=diff

==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Thu Jun 11 21:49:53 2009
@@ -10,8 +10,8 @@
     add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
   endif( LLVM_COMMON_DEPENDS )
   install(TARGETS ${name}
-    LIBRARY DESTINATION lib
-    ARCHIVE DESTINATION lib)
+    LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+    ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
 endmacro(add_llvm_library name)
 
 

Modified: llvm/trunk/cmake/modules/AddPartiallyLinkedObject.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddPartiallyLinkedObject.cmake?rev=73216&r1=73215&r2=73216&view=diff

==============================================================================
--- llvm/trunk/cmake/modules/AddPartiallyLinkedObject.cmake (original)
+++ llvm/trunk/cmake/modules/AddPartiallyLinkedObject.cmake Thu Jun 11 21:49:53 2009
@@ -38,5 +38,5 @@
     set( llvm_lib_targets ${llvm_lib_targets} ${tnplo} PARENT_SCOPE )
   endif( )
   install(FILES ${pll}
-    DESTINATION lib)
+    DESTINATION lib${LLVM_LIBDIR_SUFFIX})
 endmacro(add_partially_linked_object lib)

Modified: llvm/trunk/docs/CMake.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CMake.html?rev=73216&r1=73215&r2=73216&view=diff

==============================================================================
--- llvm/trunk/docs/CMake.html (original)
+++ llvm/trunk/docs/CMake.html Thu Jun 11 21:49:53 2009
@@ -217,6 +217,11 @@
   <dd>Path where LLVM will be installed if "make install" is invoked
     or the "INSTALL" target is built.</dd>
 
+  <dt><b>LLVM_LIBDIR_SUFFIX</b>:STRING</dt>
+  <dd>Extra suffix to append to the directory where libraries are to
+    be installed. On a 64-bit architecture, one could use
+    -DLLVM_LIBDIR_SUFFIX=64 to install libraries to /usr/lib64.</dd>
+
   <dt><b>CMAKE_C_FLAGS</b>:STRING</dt>
   <dd>Extra flags to use when compiling C source files.</dd>
 





More information about the llvm-commits mailing list