diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 |
commit | 5a5ac124e1efaf208671f01c46edb15f29ed2a0b (patch) | |
tree | a6140557876943cdd800ee997c9317283394b22c /cmake/modules/LLVM-Config.cmake | |
parent | f03b5bed27d0d2eafd68562ce14f8b5e3f1f0801 (diff) |
Diffstat (limited to 'cmake/modules/LLVM-Config.cmake')
-rwxr-xr-x | cmake/modules/LLVM-Config.cmake | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/cmake/modules/LLVM-Config.cmake b/cmake/modules/LLVM-Config.cmake index b24c12989fad..22ac71451917 100755 --- a/cmake/modules/LLVM-Config.cmake +++ b/cmake/modules/LLVM-Config.cmake @@ -41,9 +41,9 @@ function(explicit_llvm_config executable) llvm_map_components_to_libnames(LIBRARIES ${link_components}) get_target_property(t ${executable} TYPE) if("x${t}" STREQUAL "xSTATIC_LIBRARY") - target_link_libraries(${executable} ${cmake_2_8_12_INTERFACE} ${LIBRARIES}) + target_link_libraries(${executable} INTERFACE ${LIBRARIES}) elseif("x${t}" STREQUAL "xSHARED_LIBRARY" OR "x${t}" STREQUAL "xMODULE_LIBRARY") - target_link_libraries(${executable} ${cmake_2_8_12_PRIVATE} ${LIBRARIES}) + target_link_libraries(${executable} PRIVATE ${LIBRARIES}) else() # Use plain form for legacy user. target_link_libraries(${executable} ${LIBRARIES}) @@ -132,6 +132,41 @@ function(llvm_map_components_to_libnames out_libs) # already processed elseif( c STREQUAL "all" ) list(APPEND expanded_components ${LLVM_AVAILABLE_LIBS}) + elseif( c STREQUAL "AllTargetsAsmPrinters" ) + # Link all the asm printers from all the targets + foreach(t ${LLVM_TARGETS_TO_BUILD}) + if( TARGET LLVM${t}AsmPrinter ) + list(APPEND expanded_components "LLVM${t}AsmPrinter") + endif() + endforeach(t) + elseif( c STREQUAL "AllTargetsAsmParsers" ) + # Link all the asm parsers from all the targets + foreach(t ${LLVM_TARGETS_TO_BUILD}) + if( TARGET LLVM${t}AsmParser ) + list(APPEND expanded_components "LLVM${t}AsmParser") + endif() + endforeach(t) + elseif( c STREQUAL "AllTargetsDescs" ) + # Link all the descs from all the targets + foreach(t ${LLVM_TARGETS_TO_BUILD}) + if( TARGET LLVM${t}Desc ) + list(APPEND expanded_components "LLVM${t}Desc") + endif() + endforeach(t) + elseif( c STREQUAL "AllTargetsDisassemblers" ) + # Link all the disassemblers from all the targets + foreach(t ${LLVM_TARGETS_TO_BUILD}) + if( TARGET LLVM${t}Disassembler ) + list(APPEND expanded_components "LLVM${t}Disassembler") + endif() + endforeach(t) + elseif( c STREQUAL "AllTargetsInfos" ) + # Link all the infos from all the targets + foreach(t ${LLVM_TARGETS_TO_BUILD}) + if( TARGET LLVM${t}Info ) + list(APPEND expanded_components "LLVM${t}Info") + endif() + endforeach(t) else( NOT idx LESS 0 ) # Canonize the component name: string(TOUPPER "${c}" capitalized) |