[Openmp-commits] [PATCH] D153629: OpenMP/cmake: Use list append instead of repeating variable name

Matt Arsenault via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jun 23 06:58:26 PDT 2023


arsenm created this revision.
arsenm added reviewers: JonChesterfield, jhuber6, ronlieb, saiislam, jdoerfert.
Herald added subscribers: sunshaoce, guansong, yaxunl.
Herald added a project: All.
arsenm requested review of this revision.
Herald added subscribers: jplehr, sstefan1, wdng.

https://reviews.llvm.org/D153629

Files:
  openmp/libomptarget/CMakeLists.txt


Index: openmp/libomptarget/CMakeLists.txt
===================================================================
--- openmp/libomptarget/CMakeLists.txt
+++ openmp/libomptarget/CMakeLists.txt
@@ -15,7 +15,7 @@
 endif()
 
 # Add cmake directory to search for custom cmake functions.
-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules ${CMAKE_MODULE_PATH})
+list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
 
 # Set the path of all resulting libraries to a unified location so that it can
 # be used for testing.
@@ -38,18 +38,18 @@
 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-LTO")
-set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} amdgcn-amd-amdhsa")
-set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} powerpc64le-ibm-linux-gnu")
-set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} powerpc64le-ibm-linux-gnu-LTO")
-set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} powerpc64-ibm-linux-gnu")
-set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} powerpc64-ibm-linux-gnu-LTO")
-set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} x86_64-pc-linux-gnu")
-set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} x86_64-pc-linux-gnu-LTO")
-set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} nvptx64-nvidia-cuda")
-set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} nvptx64-nvidia-cuda-LTO")
-set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} nvptx64-nvidia-cuda-JIT-LTO")
+list(APPEND LIBOMPTARGET_ALL_TARGETS "aarch64-unknown-linux-gnu")
+list(APPEND LIBOMPTARGET_ALL_TARGETS "aarch64-unknown-linux-gnu-LTO")
+list(APPEND LIBOMPTARGET_ALL_TARGETS "amdgcn-amd-amdhsa")
+list(APPEND LIBOMPTARGET_ALL_TARGETS "powerpc64le-ibm-linux-gnu")
+list(APPEND LIBOMPTARGET_ALL_TARGETS "powerpc64le-ibm-linux-gnu-LTO")
+list(APPEND LIBOMPTARGET_ALL_TARGETS "powerpc64-ibm-linux-gnu")
+list(APPEND LIBOMPTARGET_ALL_TARGETS "powerpc64-ibm-linux-gnu-LTO")
+list(APPEND LIBOMPTARGET_ALL_TARGETS "x86_64-pc-linux-gnu")
+list(APPEND LIBOMPTARGET_ALL_TARGETS "x86_64-pc-linux-gnu-LTO")
+list(APPEND LIBOMPTARGET_ALL_TARGETS "nvptx64-nvidia-cuda")
+list(APPEND LIBOMPTARGET_ALL_TARGETS "nvptx64-nvidia-cuda-LTO")
+list(APPEND LIBOMPTARGET_ALL_TARGETS "nvptx64-nvidia-cuda-JIT-LTO")
 
 # Once the plugins for the different targets are validated, they will be added to
 # the list of supported targets in the current system.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153629.533948.patch
Type: text/x-patch
Size: 2671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230623/6169869c/attachment.bin>


More information about the Openmp-commits mailing list