endif()
set(LIBOMPTARGET_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
-include_directories(${LIBOMPTARGET_INCLUDE_DIR})
# Build target agnostic offloading library.
set(LIBOMPTARGET_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
libomptarget_say("Building ${tmachine_name} offloading plugin.")
- include_directories(${LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR})
- include_directories(${LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR})
-
# Define macro to be used as prefix of the runtime messages for this target.
add_definitions("-DTARGET_NAME=${tmachine_name}")
install(TARGETS "omptarget.rtl.${tmachine_libname}"
LIBRARY DESTINATION "${OPENMP_INSTALL_LIBDIR}")
+ target_include_directories( "omptarget.rtl.${tmachine_libname}" PRIVATE
+ ${LIBOMPTARGET_INCLUDE_DIR}
+ ${LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR}
+ ${LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR})
+
target_link_libraries(
"omptarget.rtl.${tmachine_libname}"
elf_common
add_definitions(-DDEBUG)
endif()
-include_directories(
- ${CMAKE_CURRENT_SOURCE_DIR}/impl
-)
-
set(LIBOMPTARGET_DLOPEN_LIBHSA OFF)
option(LIBOMPTARGET_FORCE_DLOPEN_LIBHSA "Build with dlopened libhsa" ${LIBOMPTARGET_DLOPEN_LIBHSA})
set(LDFLAGS_UNDEFINED "-Wl,-z,defs")
endif()
+target_include_directories(
+ omptarget.rtl.amdgpu
+ PRIVATE
+ ${LIBOMPTARGET_INCLUDE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/impl
+)
+
target_link_libraries(
omptarget.rtl.amdgpu
PRIVATE
# 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 PRIVATE ${LIBOMPTARGET_INCLUDE_DIR})
# Define the suffix for the runtime messaging dumps.
add_definitions(-DTARGET_NAME=CUDA)
-include_directories(
- ${LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIRS}
-)
-
set(LIBOMPTARGET_DLOPEN_LIBCUDA OFF)
option(LIBOMPTARGET_FORCE_DLOPEN_LIBCUDA "Build with dlopened libcuda" ${LIBOMPTARGET_DLOPEN_LIBCUDA})
# Install plugin under the lib destination folder.
install(TARGETS omptarget.rtl.cuda LIBRARY DESTINATION "${OPENMP_INSTALL_LIBDIR}")
+target_include_directories(omptarget.rtl.cuda PRIVATE
+ ${LIBOMPTARGET_INCLUDE_DIR}
+ ${LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIRS}
+)
+
target_link_libraries(omptarget.rtl.cuda
elf_common
MemoryManager
set(tmachine_triple "ve-unknown-linux-unknown")
set(elf_machine_id 251)
- include_directories(${LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR})
- include_directories(${LIBOMPTARGET_DEP_VEO_INCLUDE_DIR})
-
-
# Define macro to be used as prefix of the runtime messages for this target.
add_definitions("-DTARGET_NAME=${tmachine_name}")
install(TARGETS "omptarget.rtl.${tmachine_libname}"
LIBRARY DESTINATION lib${OPENMP_LIBDIR_SUFFIX})
+ target_include_directories("omptarget.rtl.${tmachine_libname}" PRIVATE
+ ${LIBOMPTARGET_INCLUDE_DIR}
+ ${LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR}
+ ${LIBOMPTARGET_DEP_VEO_INCLUDE_DIR})
+
target_link_libraries(
"omptarget.rtl.${tmachine_libname}"
elf_common
target_compile_definitions(omptarget PUBLIC OMPTARGET_PROFILE_ENABLED)
target_link_libraries(omptarget PRIVATE LLVMSupport)
endif()
+target_include_directories(omptarget PRIVATE
+ ${LIBOMPTARGET_INCLUDE_DIR})
target_link_libraries(omptarget PRIVATE
${CMAKE_DL_LIBS}
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports")
llvm_update_compile_flags(llvm-omp-device-info)
+target_include_directories(llvm-omp-device-info PRIVATE
+ ${LIBOMPTARGET_INCLUDE_DIR}
+)
target_link_libraries(llvm-omp-device-info PRIVATE
omp
omptarget