Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/openmp
diff options
context:
space:
mode:
authorShilei Tian <i@tianshilei.me>2022-03-06 06:37:46 +0300
committerShilei Tian <i@tianshilei.me>2022-03-06 06:37:59 +0300
commit7f7c2c34b6b349e2183fb87cd1a608576e8f8e8a (patch)
treedf53311ac24f4e962739c1153bed6a48e91b616d /openmp
parent86478c7ad8a7a5fd844429a27cda896774619975 (diff)
[OpenMP][CMake] Clean up the CMake variable `LIBOMPTARGET_LLVM_INCLUDE_DIRS`
`LIBOMPTARGET_LLVM_INCLUDE_DIRS` is currently checked and included for multiple times redundantly. This patch is simply a clean up. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D121055
Diffstat (limited to 'openmp')
-rw-r--r--openmp/libomptarget/CMakeLists.txt2
-rw-r--r--openmp/libomptarget/DeviceRTL/CMakeLists.txt5
-rw-r--r--openmp/libomptarget/plugins/amdgpu/CMakeLists.txt6
-rw-r--r--openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt1
-rw-r--r--openmp/libomptarget/plugins/cuda/CMakeLists.txt1
-rw-r--r--openmp/libomptarget/src/CMakeLists.txt2
6 files changed, 2 insertions, 15 deletions
diff --git a/openmp/libomptarget/CMakeLists.txt b/openmp/libomptarget/CMakeLists.txt
index 8d2f100f97b8..4f48311db6f3 100644
--- a/openmp/libomptarget/CMakeLists.txt
+++ b/openmp/libomptarget/CMakeLists.txt
@@ -35,6 +35,8 @@ if (NOT LIBOMPTARGET_LLVM_INCLUDE_DIRS)
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
index 729adff3f88b..34b488c11fa4 100644
--- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
@@ -18,11 +18,6 @@ if (NOT LIBOMPTARGET_BUILD_DEVICERTL_BCLIB)
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
index 145181206ff8..1968ae05e9f2 100644
--- a/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
+++ b/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
@@ -32,11 +32,6 @@ if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(ppc64le)|(aarch64)$" AND CMAKE_
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 @@ endif()
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
index 457aab968556..c30edd3864f4 100644
--- a/openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
+++ b/openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
@@ -20,7 +20,6 @@ if (LLVM_LINK_LLVM_DYLIB)
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
index 4329386fda6f..ad878bf210b3 100644
--- a/openmp/libomptarget/plugins/cuda/CMakeLists.txt
+++ b/openmp/libomptarget/plugins/cuda/CMakeLists.txt
@@ -31,7 +31,6 @@ add_definitions(-DTARGET_NAME=CUDA)
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
index ff85d7e7134f..db5b212c7ae7 100644
--- a/openmp/libomptarget/src/CMakeLists.txt
+++ b/openmp/libomptarget/src/CMakeLists.txt
@@ -23,8 +23,6 @@ set(LIBOMPTARGET_SRC_FILES
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")