[libc] Disable AOR ulp tests for sinf, cosf and sincosf.
[lldb.git] / libc / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.13.4)
2
3 # Use old version of target_sources command which converts the source
4 # file paths to full paths.
5 cmake_policy(SET CMP0076 OLD)
6 list(APPEND CMAKE_MODULE_PATH  "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
7
8 # The top-level source directory of libc.
9 set(LIBC_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
10 # The top-level directory in which libc is being built.
11 set(LIBC_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
12
13 # Path libc/scripts directory.
14 set(LIBC_BUILD_SCRIPTS_DIR "${LIBC_SOURCE_DIR}/utils/build_scripts")
15
16
17 set(LIBC_TARGET_OS ${CMAKE_SYSTEM_NAME})
18 string(TOLOWER ${LIBC_TARGET_OS} LIBC_TARGET_OS)
19
20 set(LIBC_TARGET_MACHINE ${CMAKE_SYSTEM_PROCESSOR})
21
22 option(LLVM_LIBC_ENABLE_LINTING "Enables linting of libc source files" ON)
23 if(LLVM_LIBC_ENABLE_LINTING)
24   if("clang-tools-extra" IN_LIST LLVM_ENABLE_PROJECTS
25              AND "clang" IN_LIST LLVM_ENABLE_PROJECTS)
26     add_custom_target(lint-libc)
27   else()
28     message(FATAL_ERROR "
29       'clang' and 'clang-tools-extra' are required in LLVM_LIBC_ENABLE_PROJECTS to
30       lint llvm-libc. The linting step performs important checks to help prevent
31       the introduction of subtle bugs, but it may increase build times.
32
33       To disable linting set LLVM_LIBC_ENABLE_LINTING to OFF
34       (pass -DLLVM_LIBC_ENABLE_LINTING=OFF to cmake).")
35   endif()
36 else()
37   message(WARNING "
38     Linting for libc is currently disabled.
39
40     This is not recommended, to enable set LLVM_LIBC_ENABLE_LINTING to ON
41     (pass -DLLVM_LIBC_ENABLE_LINTING=ON to cmake).")
42 endif()
43
44 include(CMakeParseArguments)
45 include(LLVMLibCRules)
46 include(LLVMLibCCheckCpuFeatures)
47
48 add_subdirectory(include)
49 add_subdirectory(config)
50 add_subdirectory(src)
51 add_subdirectory(utils)
52
53 # The loader can potentially depend on the library components so add it
54 # after the library implementation directories.
55 add_subdirectory(loader)
56
57 # The lib and test directories are added at the very end as tests
58 # and libraries potentially draw from the components present in all
59 # of the other directories.
60 add_subdirectory(lib)
61 if(LLVM_INCLUDE_TESTS)
62   add_subdirectory(test)
63   add_subdirectory(fuzzing)
64 endif()