[OpenMP] [OMPD] Build gdb-plugin code only when python3 development files are available.

gdb-plugin code is a interface between gdb, libompd, gdb and libomp.
Python3 development files are required to build this utility.
This patch will disable the plugin code build when python3 dev files
are not available.

Reviewed By: @mgorny, @aaronpuchert
Differential Revision: https://reviews.llvm.org/D134275
This commit is contained in:
Vignesh Balasubramanian 2022-09-20 17:42:26 +05:30
parent 333246b48e
commit 97bb709013
2 changed files with 4 additions and 4 deletions

View File

@ -8,10 +8,13 @@
#//===----------------------------------------------------------------------===//
#
find_package (Python3 COMPONENTS Interpreter Development)
option(LIBOMP_OMPD_GDB_SUPPORT "Build gdb-plugin code that enables OMPD support in GDB." ${Python3_FOUND})
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()

View File

@ -13,9 +13,6 @@ set (CMAKE_MODULE_PATH
${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