xref: /llvm-project/openmp/tools/archer/CMakeLists.txt (revision dea2defbf4aa289bf13b2df3396d5d42ab23e5f6)
1# //===----------------------------------------------------------------------===//
2# //
3# // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4# // See https://llvm.org/LICENSE.txt for details.
5# // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6# //
7# //===----------------------------------------------------------------------===//
8
9set(LIBOMP_ARCHER_SUPPORT TRUE CACHE BOOL "Build libomp with archer support")
10
11if(LIBOMP_OMPT_SUPPORT AND LIBOMP_ARCHER_SUPPORT)
12  include_directories(${LIBOMP_INCLUDE_DIR})
13
14  add_library(archer SHARED ompt-tsan.cpp)
15  target_link_libraries(archer ${CMAKE_DL_LIBS})
16  add_library(archer_static STATIC ompt-tsan.cpp)
17
18  install(TARGETS archer archer_static
19    LIBRARY DESTINATION ${OPENMP_INSTALL_LIBDIR}
20    ARCHIVE DESTINATION ${OPENMP_INSTALL_LIBDIR})
21
22  add_subdirectory(tests)
23endif()
24