diff --git a/openmp/libomptarget/CMakeLists.txt b/openmp/libomptarget/CMakeLists.txt --- a/openmp/libomptarget/CMakeLists.txt +++ b/openmp/libomptarget/CMakeLists.txt @@ -35,6 +35,8 @@ message(FATAL_ERROR "Missing definition for LIBOMPTARGET_LLVM_INCLUDE_DIRS") endif() +include_directories(${LIBOMPTARGET_LLVM_INCLUDE_DIRS}) + # This is a list of all the targets that are supported/tested right now. set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} aarch64-unknown-linux-gnu") set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} aarch64-unknown-linux-gnu-newDriver") diff --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt --- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt +++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt @@ -18,11 +18,6 @@ return() endif() -if (NOT LIBOMPTARGET_LLVM_INCLUDE_DIRS) - libomptarget_say("Not building DeviceRTL: Missing definition for LIBOMPTARGET_LLVM_INCLUDE_DIRS") - return() -endif() - if (LLVM_DIR) # Builds that use pre-installed LLVM have LLVM_DIR set. find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) diff --git a/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt b/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt --- a/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt +++ b/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt @@ -32,11 +32,6 @@ return() endif() -if (NOT LIBOMPTARGET_LLVM_INCLUDE_DIRS) - libomptarget_say("Not building AMDGPU plugin: Missing definition for LIBOMPTARGET_LLVM_INCLUDE_DIRS") - return() -endif() - ################################################################################ # Define the suffix for the runtime messaging dumps. add_definitions(-DTARGET_NAME=AMDGPU) @@ -50,7 +45,6 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/impl - ${LIBOMPTARGET_LLVM_INCLUDE_DIRS} ) set(LIBOMPTARGET_DLOPEN_LIBHSA OFF) diff --git a/openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt b/openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt --- a/openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt +++ b/openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt @@ -20,7 +20,6 @@ set(LINK_LLVM_LIBS LLVM) endif() target_link_libraries(elf_common INTERFACE ${LINK_LLVM_LIBS}) -include_directories(${LIBOMPTARGET_LLVM_INCLUDE_DIRS}) add_dependencies(elf_common ${LINK_LLVM_LIBS}) # The code uses Debug.h, which requires threads support. diff --git a/openmp/libomptarget/plugins/cuda/CMakeLists.txt b/openmp/libomptarget/plugins/cuda/CMakeLists.txt --- a/openmp/libomptarget/plugins/cuda/CMakeLists.txt +++ b/openmp/libomptarget/plugins/cuda/CMakeLists.txt @@ -31,7 +31,6 @@ include_directories( ${LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIRS} - ${LIBOMPTARGET_LLVM_INCLUDE_DIRS} ) set(LIBOMPTARGET_DLOPEN_LIBCUDA OFF) diff --git a/openmp/libomptarget/src/CMakeLists.txt b/openmp/libomptarget/src/CMakeLists.txt --- a/openmp/libomptarget/src/CMakeLists.txt +++ b/openmp/libomptarget/src/CMakeLists.txt @@ -23,8 +23,6 @@ set(LIBOMPTARGET_SRC_FILES ${LIBOMPTARGET_SRC_FILES} PARENT_SCOPE) -include_directories(${LIBOMPTARGET_LLVM_INCLUDE_DIRS}) - # Build libomptarget library with libdl dependency. add_library(omptarget SHARED ${LIBOMPTARGET_SRC_FILES}) set_target_properties(omptarget PROPERTIES INSTALL_RPATH "$ORIGIN" BUILD_RPATH "$ORIGIN")