File tree Expand file tree Collapse file tree 4 files changed +19
-16
lines changed Expand file tree Collapse file tree 4 files changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,25 @@ set(LIBOMPTARGET_PLUGINS_TO_BUILD "all" CACHE STRING
143
143
if (LIBOMPTARGET_PLUGINS_TO_BUILD STREQUAL "all" )
144
144
set (LIBOMPTARGET_PLUGINS_TO_BUILD ${LIBOMPTARGET_ALL_PLUGIN_TARGETS} )
145
145
endif ()
146
+
147
+ if (NOT CMAKE_SYSTEM_NAME MATCHES "Linux" AND
148
+ "host" IN_LIST LIBOMPTARGET_PLUGINS_TO_BUILD )
149
+ message (STATUS "Not building host plugin: only Linux systems are supported" )
150
+ list (REMOVE_ITEM LIBOMPTARGET_PLUGINS_TO_BUILD "host" )
151
+ endif ()
152
+ if (NOT (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(ppc64le)|(aarch64)$"
153
+ AND CMAKE_SYSTEM_NAME MATCHES "Linux" ))
154
+ if ("amdgpu" IN_LIST LIBOMPTARGET_PLUGINS_TO_BUILD )
155
+ message (STATUS "Not building AMDGPU plugin: only support AMDGPU in "
156
+ "Linux x86_64, ppc64le, or aarch64 hosts" )
157
+ list (REMOVE_ITEM LIBOMPTARGET_PLUGINS_TO_BUILD "amdgpu" )
158
+ endif ()
159
+ if ("nvptx" IN_LIST LIBOMPTARGET_PLUGINS_TO_BUILD )
160
+ message (STATUS "Not building CUDA plugin: only support AMDGPU in "
161
+ "Linux x86_64, ppc64le, or aarch64 hosts" )
162
+ list (REMOVE_ITEM LIBOMPTARGET_PLUGINS_TO_BUILD "cuda" )
163
+ endif ()
164
+ endif ()
146
165
message (STATUS "Building the offload library with support for "
147
166
"the \" ${LIBOMPTARGET_PLUGINS_TO_BUILD} \" plugins" )
148
167
Original file line number Diff line number Diff line change 1
1
# As of rocm-3.7, hsa is installed with cmake packages and kmt is found via hsa
2
2
find_package (hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm )
3
3
4
- if (NOT (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(ppc64le)|(aarch64)$" AND CMAKE_SYSTEM_NAME MATCHES "Linux" ))
5
- message (STATUS "Not building AMDGPU NextGen plugin: only support AMDGPU in Linux x86_64, ppc64le, or aarch64 hosts" )
6
- return ()
7
- endif ()
8
-
9
4
# Create the library and add the default arguments.
10
5
add_target_library (omptarget.rtl.amdgpu AMDGPU )
11
6
Original file line number Diff line number Diff line change 1
- if (NOT (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(ppc64le)|(aarch64)$" AND CMAKE_SYSTEM_NAME MATCHES "Linux" ))
2
- message (STATUS "Not building CUDA NextGen offloading plugin: only support CUDA in Linux x86_64, ppc64le, or aarch64 hosts." )
3
- return ()
4
- endif ()
5
-
6
- message (STATUS "Building CUDA NextGen offloading plugin." )
7
-
8
1
# Create the library and add the default arguments.
9
2
add_target_library (omptarget.rtl.cuda CUDA )
10
3
Original file line number Diff line number Diff line change 1
- if (NOT CMAKE_SYSTEM_NAME MATCHES "Linux" )
2
- return ()
3
- endif ()
4
-
5
1
set (supported_targets x86_64 aarch64 ppc64 ppc64le s390x )
6
2
if (NOT ${CMAKE_SYSTEM_PROCESSOR} IN_LIST supported_targets )
7
3
message (STATUS "Not building ${machine} NextGen offloading plugin" )
You can’t perform that action at this time.
0 commit comments