[llvm-commits] [llvm] r86656 - in /llvm/trunk: cmake/modules/AddLLVM.cmake cmake/modules/LLVMLibDeps.cmake lib/Transforms/Hello/CMakeLists.txt
Oscar Fuentes
ofv at wanadoo.es
Mon Nov 9 18:45:37 PST 2009
Author: ofv
Date: Mon Nov 9 20:45:37 2009
New Revision: 86656
URL: http://llvm.org/viewvc/llvm-project?rev=86656&view=rev
Log:
CMake: Support for building llvm loadable modules.
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
llvm/trunk/cmake/modules/LLVMLibDeps.cmake
llvm/trunk/lib/Transforms/Hello/CMakeLists.txt
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=86656&r1=86655&r2=86656&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Mon Nov 9 20:45:37 2009
@@ -22,6 +22,22 @@
endmacro(add_llvm_library name)
+macro(add_llvm_loadable_module name)
+ if( NOT LLVM_ON_UNIX )
+ message(STATUS "Loadable modules not supported on this platform.
+${name} ignored.")
+ else()
+ set(BUILD_SHARED_LIBS ON)
+ llvm_process_sources( ALL_FILES ${ARGN} )
+ add_library( ${name} MODULE ${ALL_FILES} )
+ set_target_properties( ${name} PROPERTIES PREFIX "" )
+ install(TARGETS ${name}
+ LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+ ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
+ endif()
+endmacro(add_llvm_loadable_module name)
+
+
macro(add_llvm_executable name)
llvm_process_sources( ALL_FILES ${ARGN} )
add_executable(${name} ${ALL_FILES})
Modified: llvm/trunk/cmake/modules/LLVMLibDeps.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMLibDeps.cmake?rev=86656&r1=86655&r2=86656&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/LLVMLibDeps.cmake (original)
+++ llvm/trunk/cmake/modules/LLVMLibDeps.cmake Mon Nov 9 20:45:37 2009
@@ -24,7 +24,6 @@
set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMSystem LLVMTarget)
set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMSupport)
set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMHello LLVMCore LLVMSupport LLVMSystem)
set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTransformUtils)
set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget)
set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget)
Modified: llvm/trunk/lib/Transforms/Hello/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Hello/CMakeLists.txt?rev=86656&r1=86655&r2=86656&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Hello/CMakeLists.txt (original)
+++ llvm/trunk/lib/Transforms/Hello/CMakeLists.txt Mon Nov 9 20:45:37 2009
@@ -1,3 +1,3 @@
-add_llvm_library( LLVMHello
+add_llvm_loadable_module( LLVMHello
Hello.cpp
)
More information about the llvm-commits
mailing list