1 include(GNUInstallDirs)
2 include(LLVMDistributionSupport)
4 macro(add_bolt_executable name)
5 add_llvm_executable(${name} ${ARGN})
8 macro(add_bolt_tool name)
9 if (NOT BOLT_BUILD_TOOLS)
10 set(EXCLUDE_FROM_ALL ON)
13 add_bolt_executable(${name} ${ARGN})
16 get_target_export_arg(${name} BOLT export_to_bolttargets)
17 install(TARGETS ${name}
18 ${export_to_bolttargets}
19 RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
22 if(NOT LLVM_ENABLE_IDE)
23 add_llvm_install_targets(install-${name}
27 set_property(GLOBAL APPEND PROPERTY BOLT_EXPORTS ${name})
31 macro(add_bolt_tool_symlink name dest)
32 llvm_add_tool_symlink(BOLT ${name} ${dest} ALWAYS_GENERATE)
33 # Always generate install targets
34 llvm_install_symlink(BOLT ${name} ${dest} ALWAYS_GENERATE COMPONENT bolt)