brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 81cf74f Raw
23 lines · plain
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-exception6#7#===--------------------------------------------------------------------===//8 9if(NOT TARGET llvm-libc-common-utilities)10  set(libc_path ${CMAKE_CURRENT_LIST_DIR}/../../libc)11  if (EXISTS ${libc_path} AND IS_DIRECTORY ${libc_path})12    add_library(llvm-libc-common-utilities INTERFACE)13    # TODO: Reorganize the libc shared section so that it can be included without14    # adding the root "libc" directory to the include path.15    if (NOT(LIBCXX_ENABLE_THREADS))16      target_compile_definitions(llvm-libc-common-utilities INTERFACE LIBC_THREAD_MODE=LIBC_THREAD_MODE_SINGLE)17    endif()18    target_include_directories(llvm-libc-common-utilities INTERFACE ${libc_path})19    target_compile_definitions(llvm-libc-common-utilities INTERFACE LIBC_NAMESPACE=__llvm_libc_common_utils)20    target_compile_features(llvm-libc-common-utilities INTERFACE cxx_std_17)21  endif()22endif()23