diff options
author | Vignesh Balasubramanian <Vignesh.Balasubrmanian@amd.com> | 2022-09-20 17:42:26 +0530 |
---|---|---|
committer | Vignesh Balasubramanian <Vignesh.Balasubrmanian@amd.com> | 2022-10-07 14:35:56 +0530 |
commit | 97bb709013a2d9a75fccce41175efd4db486ac89 (patch) | |
tree | da01e13ddd1d8ab9a2b20f71f8286435bad07dc3 /openmp/libompd | |
parent | 333246b48ea4a70842e78c977cc92d365720465f (diff) | |
download | llvm-97bb709013a2d9a75fccce41175efd4db486ac89.zip llvm-97bb709013a2d9a75fccce41175efd4db486ac89.tar.gz llvm-97bb709013a2d9a75fccce41175efd4db486ac89.tar.bz2 |
[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
Diffstat (limited to 'openmp/libompd')
-rw-r--r-- | openmp/libompd/CMakeLists.txt | 5 | ||||
-rw-r--r-- | openmp/libompd/gdb-plugin/CMakeLists.txt | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/openmp/libompd/CMakeLists.txt b/openmp/libompd/CMakeLists.txt index aac5b67..7720af1 100644 --- a/openmp/libompd/CMakeLists.txt +++ b/openmp/libompd/CMakeLists.txt @@ -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() diff --git a/openmp/libompd/gdb-plugin/CMakeLists.txt b/openmp/libompd/gdb-plugin/CMakeLists.txt index 06726a9..a60f941 100644 --- a/openmp/libompd/gdb-plugin/CMakeLists.txt +++ b/openmp/libompd/gdb-plugin/CMakeLists.txt @@ -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 |