1 # //===----------------------------------------------------------------------===//
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
7 # //===----------------------------------------------------------------------===//
9 set(LIBOMP_ARCHER_SUPPORT TRUE CACHE BOOL "Build libomp with archer support")
11 if(LIBOMP_OMPT_SUPPORT AND LIBOMP_ARCHER_SUPPORT)
12 include_directories(${LIBOMP_INCLUDE_DIR})
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)
18 install(TARGETS archer archer_static
19 LIBRARY DESTINATION ${OPENMP_INSTALL_LIBDIR}
20 ARCHIVE DESTINATION ${OPENMP_INSTALL_LIBDIR})
22 add_subdirectory(tests)