1 include(GNUInstallDirs)
2 include(LLVMDistributionSupport)
4 macro(add_bolt_executable name)
5 add_llvm_executable(${name} ${ARGN})
6 set_target_properties(${name} PROPERTIES FOLDER "BOLT")
9 macro(add_bolt_tool name)
10 if (NOT BOLT_BUILD_TOOLS)
11 set(EXCLUDE_FROM_ALL ON)
14 add_bolt_executable(${name} ${ARGN})
17 get_target_export_arg(${name} BOLT export_to_bolttargets)
18 install(TARGETS ${name}
19 ${export_to_bolttargets}
20 RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
23 if(NOT LLVM_ENABLE_IDE)
24 add_llvm_install_targets(install-${name}
28 set_property(GLOBAL APPEND PROPERTY BOLT_EXPORTS ${name})
32 macro(add_bolt_tool_symlink name dest)
33 llvm_add_tool_symlink(BOLT ${name} ${dest} ALWAYS_GENERATE)
34 # Always generate install targets
35 llvm_install_symlink(BOLT ${name} ${dest} ALWAYS_GENERATE COMPONENT bolt)