[Openmp-commits] [PATCH] D134275: [OpenMP] [OMPD] Build gdb-plugin code only when python3 development files are available.

Vignesh Balasubramanian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Oct 2 22:17:24 PDT 2022


Vigneshbalu updated this revision to Diff 464604.
Vigneshbalu added a comment.

Apologies for delay. Updated the patch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134275/new/

https://reviews.llvm.org/D134275

Files:
  openmp/libompd/CMakeLists.txt
  openmp/libompd/gdb-plugin/CMakeLists.txt


Index: openmp/libompd/gdb-plugin/CMakeLists.txt
===================================================================
--- openmp/libompd/gdb-plugin/CMakeLists.txt
+++ openmp/libompd/gdb-plugin/CMakeLists.txt
@@ -13,9 +13,6 @@
     ${CMAKE_MODULE_PATH}
 )
 
-find_package (Python3 COMPONENTS Interpreter Development)
-find_package (PythonLibs REQUIRED)
-
 include_directories (${OMPD_INCLUDE_PATH})
 include_directories (${LIBOMP_INCLUDE_DIR})
 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python-module/ompd/__init__.py
Index: openmp/libompd/CMakeLists.txt
===================================================================
--- openmp/libompd/CMakeLists.txt
+++ openmp/libompd/CMakeLists.txt
@@ -8,10 +8,18 @@
 #//===----------------------------------------------------------------------===//
 #
 
+option(LIBOMP_OMPD_GDB_SUPPORT "Build gdb-plugin code that enables OMPD support in GDB." OFF)
+
+find_package (Python3 COMPONENTS Interpreter Development)
+if (Python3_FOUND)
+    set(LIBOMP_OMPD_GDB_SUPPORT ON)
+endif()
+
+
 if(LIBOMP_OMPD_SUPPORT)
     set(OMPD_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/)
     add_subdirectory(src)
-    if(NOT DISABLE_OMPD_GDB_PLUGIN)
+    if(LIBOMP_OMPD_GDB_SUPPORT)
         add_subdirectory(gdb-plugin)
     endif()
 endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134275.464604.patch
Type: text/x-patch
Size: 1275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221003/39cd8c7b/attachment.bin>


More information about the Openmp-commits mailing list