diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-06-23 18:30:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-06-23 18:30:17 +0000 |
commit | 8756a8db5b14fac4ad7e3a0a11cc0b3c115e826d (patch) | |
tree | 49a9a83bd9019b2c022b02a1223f0a615cf1f7ee /cmake | |
parent | 14112e51697e56788fcb32f4255833499c2738b5 (diff) |
CMake: remove support for llvm-config-generated dependencies in the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-x | cmake/modules/AddLLVM.cmake | 6 | ||||
-rwxr-xr-x | cmake/modules/LLVMConfig.cmake | 46 |
2 files changed, 3 insertions, 49 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 6dd1e475cf..b196c63e7b 100755 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -26,11 +26,7 @@ macro(add_llvm_executable name) if( LLVM_LINK_COMPONENTS ) llvm_config(${name} ${LLVM_LINK_COMPONENTS}) endif( LLVM_LINK_COMPONENTS ) - if( USE_EXPLICIT_DEPENDENCIES ) - target_link_libraries(${name} ${llvm_libs}) - else( ) - add_dependencies(${name} llvm-config.target) - endif( ) + target_link_libraries(${name} ${llvm_libs}) get_system_libs(llvm_system_libs) if( llvm_system_libs ) target_link_libraries(${name} ${llvm_system_libs}) diff --git a/cmake/modules/LLVMConfig.cmake b/cmake/modules/LLVMConfig.cmake index fd92495187..5fa08a39d6 100755 --- a/cmake/modules/LLVMConfig.cmake +++ b/cmake/modules/LLVMConfig.cmake @@ -20,12 +20,7 @@ endfunction(get_system_libs) macro(llvm_config executable) - # extra args is the list of link components. - if( USE_EXPLICIT_DEPENDENCIES ) - explicit_llvm_config(${executable} ${ARGN}) - else( ) - nix_llvm_config(${executable} ${ARGN}) - endif( ) + explicit_llvm_config(${executable} ${ARGN}) endmacro(llvm_config) @@ -127,44 +122,7 @@ function(explicit_map_components_to_libraries out_libs) set(${out_libs} ${result} PARENT_SCOPE) endfunction(explicit_map_components_to_libraries) - -macro(nix_llvm_config executable) - set(lc "") - foreach(c ${ARGN}) - set(lc "${lc} ${c}") - endforeach(c) - if( NOT HAVE_LLVM_CONFIG ) - target_link_libraries(${executable} - "`${LLVM_TOOLS_BINARY_DIR}/llvm-config --libs ${lc}`") - else( NOT HAVE_LLVM_CONFIG ) - # tbi: Error handling. - if( NOT PERL_EXECUTABLE ) - message(FATAL_ERROR "Perl required but not found!") - endif( NOT PERL_EXECUTABLE ) - execute_process( - COMMAND sh -c "${PERL_EXECUTABLE} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/llvm-config --libs ${lc}" - RESULT_VARIABLE rv - OUTPUT_VARIABLE libs - OUTPUT_STRIP_TRAILING_WHITESPACE) - if(NOT rv EQUAL 0) - message(FATAL_ERROR "llvm-config failed for executable ${executable}") - endif(NOT rv EQUAL 0) - string(REPLACE " " ";" libs ${libs}) - foreach(c ${libs}) - if(c MATCHES ".*\\.o") - get_filename_component(fn ${c} NAME) - target_link_libraries(${executable} - ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${fn}) - else(c MATCHES ".*\\.o") - string(REPLACE "-l" "" fn ${c}) - target_link_libraries(${executable} ${fn}) - endif(c MATCHES ".*\\.o") - endforeach(c) - endif( NOT HAVE_LLVM_CONFIG ) -endmacro(nix_llvm_config) - - -# This data is used on MSVC for stablishing executable/library +# This data is used to establish executable/library # dependencies. Comes from the llvm-config script, which is built and # installed on the bin directory for MinGW or Linux. At the end of the # script, you'll see lines like this: |