[Openmp-commits] [PATCH] D95574: [OpenMP][Libomptarget] Fix conditional in CMake for remote plugin

Atmn Patel via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jan 27 15:53:26 PST 2021


atmnpatel created this revision.
atmnpatel added reviewers: jdoerfert, JonChesterfield, tianshilei1992.
Herald added subscribers: guansong, yaxunl, mgorny.
atmnpatel requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

The remote offloading plugin's CMakeLists was trying to build if its
flag was enabled even if it didn't find gRPC/protobuf. The conditional
was wrong, it's fixed by this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95574

Files:
  openmp/libomptarget/plugins/remote/CMakeLists.txt


Index: openmp/libomptarget/plugins/remote/CMakeLists.txt
===================================================================
--- openmp/libomptarget/plugins/remote/CMakeLists.txt
+++ openmp/libomptarget/plugins/remote/CMakeLists.txt
@@ -42,12 +42,13 @@
   set(GRPC_INCLUDE_DIR
       ${directory}
   )
+
+  set(RPC_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/)
+  set(RPC_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/)
+  
+  add_subdirectory(src)
+  add_subdirectory(server)
 else()
   libomptarget_say("Not building remote offloading plugin: required libraries were not found.")
 endif()
 
-set(RPC_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/)
-set(RPC_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/)
-
-add_subdirectory(src)
-add_subdirectory(server)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95574.319703.patch
Type: text/x-patch
Size: 752 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210127/6cfecc5e/attachment.bin>


More information about the Openmp-commits mailing list