1# 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#//===----------------------------------------------------------------------===// 9# 10 11find_package (Python3 COMPONENTS Interpreter Development) 12option(LIBOMP_OMPD_GDB_SUPPORT "Build gdb-plugin code that enables OMPD support in GDB." ${Python3_FOUND}) 13find_program (GDB_FOUND NAMES "gdb") 14 15 16if(LIBOMP_OMPD_SUPPORT) 17 set(OMPD_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/) 18 add_subdirectory(src) 19 if(LIBOMP_OMPD_GDB_SUPPORT) 20 add_subdirectory(gdb-plugin) 21 # GDB is required to run the tests 22 if (GDB_FOUND) 23 add_subdirectory(test) 24 endif() 25 endif() 26endif() 27