Skip to content

Commit 8a77056

Browse files
committed
[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
1 parent 02bc4c9 commit 8a77056

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

openmp/libomptarget/plugins/remote/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ if (Protobuf_FOUND AND gRPC_FOUND AND PROTOC AND GRPC_CPP_PLUGIN)
4242
set(GRPC_INCLUDE_DIR
4343
${directory}
4444
)
45+
46+
set(RPC_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/)
47+
set(RPC_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/)
48+
49+
add_subdirectory(src)
50+
add_subdirectory(server)
4551
else()
4652
libomptarget_say("Not building remote offloading plugin: required libraries were not found.")
4753
endif()
4854

49-
set(RPC_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/)
50-
set(RPC_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/)
51-
52-
add_subdirectory(src)
53-
add_subdirectory(server)

0 commit comments

Comments
 (0)