Skip to content

Commit

Permalink
[OpenMP][Libomptarget] Fix conditional in CMake for remote plugin
Browse files Browse the repository at this point in the history
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 8a77056)
  • Loading branch information
atmnpatel authored and tstellar committed Feb 3, 2021
1 parent e2d822c commit 12b6579
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions openmp/libomptarget/plugins/remote/CMakeLists.txt
Expand Up @@ -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)

0 comments on commit 12b6579

Please sign in to comment.