Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
##===----------------------------------------------------------------------===## | ##===----------------------------------------------------------------------===## | ||||
# | # | ||||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
# See https://llvm.org/LICENSE.txt for license information. | # See https://llvm.org/LICENSE.txt for license information. | ||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
# | # | ||||
##===----------------------------------------------------------------------===## | ##===----------------------------------------------------------------------===## | ||||
# | # | ||||
# Common ELF functionality for target plugins | # Common ELF functionality for target plugins | ||||
# | # | ||||
##===----------------------------------------------------------------------===## | ##===----------------------------------------------------------------------===## | ||||
add_library(elf_common INTERFACE) | add_library(elf_common OBJECT elf_common.cpp) | ||||
llvm_update_compile_flags(elf_common) | |||||
set(LINK_LLVM_LIBS LLVMBinaryFormat LLVMObject LLVMSupport) | |||||
target_link_libraries(elf_common INTERFACE ${LINK_LLVM_LIBS} ${LIBOMPTARGET_DEP_LIBELF_LIBRARIES}) | |||||
add_dependencies(elf_common ${LINK_LLVM_LIBS}) | |||||
# The code uses Debug.h, which requires threads support. | |||||
target_link_libraries(elf_common INTERFACE ${OPENMP_PTHREAD_LIB}) | |||||
# Expose elf_common.h directory to the users of this library. | |||||
target_include_directories(elf_common INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) | target_include_directories(elf_common INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) |