[flang] Fix crash in HLFIR generation (#118399)
[llvm-project.git] / openmp / libompd / gdb-plugin / CMakeLists.txt
blob20cb4680e4cbfa22ec55164aa3d05a7aaea3988b
2 #//===----------------------------------------------------------------------===//
3 #//
4 #// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 #// See https://llvm.org/LICENSE.txt for license information.
6 #// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 #//
8 #//===----------------------------------------------------------------------===//
11 set (CMAKE_MODULE_PATH
12     "${CMAKE_SOURCE_DIR}/libompd/"
13     ${CMAKE_MODULE_PATH}
16 include_directories (${OMPD_INCLUDE_PATH})
17 include_directories (${LIBOMP_INCLUDE_DIR})
18 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python-module/ompd/__init__.py
19                    DEPENDS ompdModule.c ompdAPITests.c ompd/frame_filter.py ompd/__init__.py ompd/ompd_address_space.py ompd/ompd_callbacks.py ompd/ompd_handles.py ompd/ompd.py
20                    COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/ompd ${CMAKE_CURRENT_BINARY_DIR}/python-module/ompd/
21                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
23 add_custom_target(ompd_gdb_plugin ALL
24                   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/python-module/ompd/__init__.py
25                   COMMENT "Building the OMPD GDB plugin")
27 add_library (ompdModule MODULE ompdModule.c ompdAPITests.c)
28 include_directories (
29         ${LIBOMP_INCLUDE_DIR}
30         ${LIBOMP_SRC_DIR}
31         ${Python3_INCLUDE_DIRS}
33 target_link_libraries (ompdModule ${Python3_LIBRARIES})
34 target_link_libraries (ompdModule ${CMAKE_DL_LIBS})
36 set_target_properties (ompdModule PROPERTIES PREFIX "")
37 set_target_properties (ompdModule PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/python-module/ompd/")
39 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/python-module/ompd DESTINATION share/gdb/python/ PATTERN ompdModule.so PERMISSIONS OWNER_READ WORLD_READ GROUP_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)