Changeset View
Changeset View
Standalone View
Standalone View
include/CMakeLists.txt
set(SANITIZER_HEADERS | set(SANITIZER_HEADERS | ||||
rnk: Maybe rename this to COMPILER_RT_HEADERS, since it's not just sanitizers? | |||||
Not Done ReplyInline ActionsGood point. Unfortunately the install path is still .../include/sanitizer -- I've added a new variable instead, COMPILER_RT_HEADERS which aggregates SANITIZER_HEADERS and XRAY_HEADERS, and another install rule for xray headers to go into .../include/xray. Does this make sense? dberris: Good point. Unfortunately the install path is still .../include/sanitizer -- I've added a new… | |||||
sanitizer/allocator_interface.h | sanitizer/allocator_interface.h | ||||
sanitizer/asan_interface.h | sanitizer/asan_interface.h | ||||
sanitizer/common_interface_defs.h | sanitizer/common_interface_defs.h | ||||
sanitizer/coverage_interface.h | sanitizer/coverage_interface.h | ||||
sanitizer/dfsan_interface.h | sanitizer/dfsan_interface.h | ||||
sanitizer/esan_interface.h | sanitizer/esan_interface.h | ||||
sanitizer/linux_syscall_hooks.h | sanitizer/linux_syscall_hooks.h | ||||
sanitizer/lsan_interface.h | sanitizer/lsan_interface.h | ||||
sanitizer/msan_interface.h | sanitizer/msan_interface.h | ||||
sanitizer/tsan_interface_atomic.h) | sanitizer/tsan_interface_atomic.h) | ||||
set(XRAY_HEADERS | |||||
xray/xray_interface.h) | |||||
set(COMPILER_RT_HEADERS | |||||
${SANITIZER_HEADERS} | |||||
${XRAY_HEADERS}) | |||||
set(output_dir ${COMPILER_RT_OUTPUT_DIR}/include) | set(output_dir ${COMPILER_RT_OUTPUT_DIR}/include) | ||||
# Copy compiler-rt headers to the build tree. | # Copy compiler-rt headers to the build tree. | ||||
set(out_files) | set(out_files) | ||||
foreach( f ${SANITIZER_HEADERS} ) | foreach( f ${COMPILER_RT_HEADERS} ) | ||||
set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} ) | set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} ) | ||||
set( dst ${output_dir}/${f} ) | set( dst ${output_dir}/${f} ) | ||||
add_custom_command(OUTPUT ${dst} | add_custom_command(OUTPUT ${dst} | ||||
DEPENDS ${src} | DEPENDS ${src} | ||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} | ||||
COMMENT "Copying compiler-rt's ${f}...") | COMMENT "Copying compiler-rt's ${f}...") | ||||
list(APPEND out_files ${dst}) | list(APPEND out_files ${dst}) | ||||
endforeach( f ) | endforeach( f ) | ||||
add_custom_target(compiler-rt-headers ALL DEPENDS ${out_files}) | add_custom_target(compiler-rt-headers ALL DEPENDS ${out_files}) | ||||
add_dependencies(compiler-rt compiler-rt-headers) | add_dependencies(compiler-rt compiler-rt-headers) | ||||
set_target_properties(compiler-rt-headers PROPERTIES FOLDER "Compiler-RT Misc") | set_target_properties(compiler-rt-headers PROPERTIES FOLDER "Compiler-RT Misc") | ||||
# Install sanitizer headers. | # Install sanitizer headers. | ||||
install(FILES ${SANITIZER_HEADERS} | install(FILES ${SANITIZER_HEADERS} | ||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | ||||
DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer) | DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer) | ||||
# Install xray headers. | |||||
install(FILES ${XRAY_HEADERS} | |||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | |||||
DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray) |
Maybe rename this to COMPILER_RT_HEADERS, since it's not just sanitizers?