summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtmn Patel <atmndp@gmail.com>2021-01-27 18:49:41 -0500
committerTom Stellard <tstellar@redhat.com>2021-02-03 14:23:22 -0800
commit12b6579b79dc21e9e54e74520ece0d571a640d4b (patch)
treefabd73c6fd82fcb5aa29398246d58b0b6f798d08
parente2d822c3bdf6388c6ef21f35745105aba064d16d (diff)
downloadllvm-12b6579b79dc21e9e54e74520ece0d571a640d4b.tar.gz
[OpenMP][Libomptarget] Fix conditional in CMake for remote plugin
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. Differential Revision: https://reviews.llvm.org/D95574 (cherry picked from commit 8a77056256d9970387595a5c729d894e3fe07131)
-rw-r--r--openmp/libomptarget/plugins/remote/CMakeLists.txt11
1 files changed, 6 insertions, 5 deletions
diff --git a/openmp/libomptarget/plugins/remote/CMakeLists.txt b/openmp/libomptarget/plugins/remote/CMakeLists.txt
index 1baa1125f44c..989c74642c66 100644
--- a/openmp/libomptarget/plugins/remote/CMakeLists.txt
+++ b/openmp/libomptarget/plugins/remote/CMakeLists.txt
@@ -42,12 +42,13 @@ if (Protobuf_FOUND AND gRPC_FOUND AND PROTOC AND GRPC_CPP_PLUGIN)
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)